Skip to content

Commit 042ef40

Browse files
authored
[scudo][fuchsia] Give dispatched VMOs a (temporary) name (#97578)
Instead of leaving them unnamed. Subsequent remap() calls will set the actual final name.
1 parent afee09c commit 042ef40

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

compiler-rt/lib/scudo/standalone/mem_map_fuchsia.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,12 +91,15 @@ static bool IsNoMemError(zx_status_t Status) {
9191
return Status == ZX_ERR_NO_MEMORY || Status == ZX_ERR_NO_RESOURCES;
9292
}
9393

94+
// Note: this constructor is only called by ReservedMemoryFuchsia::dispatch.
9495
MemMapFuchsia::MemMapFuchsia(uptr Base, uptr Capacity)
9596
: MapAddr(Base), WindowBase(Base), WindowSize(Capacity) {
9697
// Create the VMO.
9798
zx_status_t Status = _zx_vmo_create(Capacity, 0, &Vmo);
9899
if (UNLIKELY(Status != ZX_OK))
99100
dieOnError(Status, "zx_vmo_create", Capacity);
101+
102+
setVmoName(Vmo, "scudo:dispatched");
100103
}
101104

102105
bool MemMapFuchsia::mapImpl(UNUSED uptr Addr, uptr Size, const char *Name,

0 commit comments

Comments
 (0)