[PATCH] D129326: [scudo] Pass MapPlatformData to all map/unmap calls
Kostya Kortchinsky via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jul 8 10:14:03 PDT 2022
cryptoad added inline comments.
================
Comment at: compiler-rt/lib/scudo/standalone/primary32.h:518
+ [[no_unique_address]] MapPlatformData StashMapData[MaxStashedRegions] = {};
+ [[no_unique_address]] MapPlatformData RegionsMapData[NumRegions] = {};
};
----------------
ddcc wrote:
> cryptoad wrote:
> > You might want to be careful with an array of `NumRegions` elements as this can become real large real fast.
> > On Linux for now this isn't a problem as the `MapPlatformData` is empty, and Fuchsia doesn't support the 32-bit primary.
> > But this is risky in terms of memory footprint.
> Yeah, it does look to be a lot of overhead. I'm not using primary32.h at all except in testing, but my platform does require MapPlatformData be passed into all memory mapping system calls. I could just disable primary32.h in testing, but then building that header file would just be broken.
A side point: I might be wrong but I think `StashMapData` redundant as the map data of stashed region could be stored in the overall `RegionMapData`.
Can you judge from your tests/compilation if the sizes of the binaries change at all?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D129326/new/
https://reviews.llvm.org/D129326
More information about the llvm-commits
mailing list