Removing a reinterpret_cast<void *>.
Fri, Jun 14
Addressing review comments:
- renaming allocator.h to allocator_config.h
- adding FuchsiaConfig to the battery of tests (64-bit only)
Thu, Jun 13
Tune some tests & Quarantine parameters.
Enabled the Quarantine for some tests, which wasn't used before.
Wed, Jun 12
Tue, Jun 11
Update the deleters to actually delete the pointer itself as well.
Mon, Jun 10
Fri, Jun 7
Always call initOnce, and rename it initOnceMaybe to reflect that
initialization might not necessarily occur if it already happened.
clang-format'ing the code.
Use an atomic_u8 for Initialized instead of a bool.
As discussed through comments, re-introduce a StaticSpinMutex to the
"once" initialization of the TSD registry, and remove its no-op
initLinkerInitialized in the various places it was used.
Also adds a test to exercise the path of "direct" initialization
via calling initLinkerInitialized directly on the registry.
Thu, Jun 6
Ping pretty please! I think all the comments were addressed one way or another. The new structure doesn't "cycle" anymore.
Wed, Jun 5
I think it's good from the integration perspective.
The only potential concern I have is the specific use of the TLS variables in GWP-ASan which might not work everywhere here (eg: if a platform is using emutls as TLS as it uses malloc() internally).
Have you tested that locally with an Android emulator?
Mon, Jun 3
Disable a test on 32-bit for now: we are running out of address space.
This will be fixed in a subsequent CL, but affects the tests of this one.
Change the Primary test again to be more forgiving to OOM.
Add a comment for MinimalInit.
This, hopefully, detangles a bit the initialization process for
the registry. In order to do that, we get rid of the mutex in favor
of our own call_once type construct (losely inspired by
llvm::call_once). We move the initialization code into
Wed, May 29
Fri, May 24
Switching from a spin mutex to a blocking mutex for initOnce.
Regarding the Scudo side of the patch: the code has to be able to compile with gcc as well, and not necessarily the latest version.
This won't compile on systems without a signature_HYGON_*.
Addressing several of Matt's review points:
- adding comments to obscure code snippets
- calling initLinkerInitialized when needed
- changing unique_ptr's get()-> to ->
- simplifying some code constructs
Matt, thank you for all the reviews you are doing. Very insightful points.
Wed, May 22
Correct a test and some formatting.
Mon, May 20
May 17 2019
Correcting a typo (meaningul -> meaningful)
Adding a forgotten CHECK as well.
Correcting some code constructs as suggested by Matt:
- using unique_ptr in tests;
- accounting for a potential null TransferBatch in refill;
- other corrections.
May 16 2019
Simplify a lot of the functions prototypes by storing a pointer to the
size-class allocator in the cache, or getting the stats from the cache,
May 15 2019
I think the idea is that implementing our own spinlock is not much harder than having 3 platform-specific implementations (posix, window, fuchsia).
Also, scudo_standalone is doing the same ( @cryptoad, why? ).
As Mitch mentioned, we should move the implementation into a common directory. Why not do this now?
May 14 2019
This could use a review please!
May 9 2019
May 8 2019
I had to backpedal on some of changes due to some errors uncovered
while testing on Fuchsia.
Working out some kinks on Fuchsia. Will update once it's ironed out.
Actually remove 2 unused masks.
Rename AllocTypeMask to OriginMask.
The HashAlgorithm global variable doesn't have to be atomic since
all alloc operations are stalled until init completes. Update things
accordingly (thanks Vitaly).
May 7 2019
Updated to use class enums, and put some structures that uses to
be in the scudo namespace into the scudo::Chunk one, as it
makes more sense.
May 6 2019
Addressing Matt's new comments:
- changing another %d to %zd
- changing the iterating loop to a range loop
- clang-format'ing the source
Addressing Matt's comments:
- changing some initializers to initLinkerInitialized. This also required implementing a no-op version of this function for StaticSpinMutex
- changed a %d to %zd
May 2 2019
May 1 2019
Apr 30 2019
Apr 29 2019
Addressing Vitaly's comments.
Apr 26 2019
Apr 25 2019
Apr 24 2019
Correct comment & a format string.