This is an archive of the discontinued LLVM Phabricator instance.

[compiler-rt] Go back to using the 32-bit allocator for Fuchsia+RISCV64
ClosedPublic

Authored by leonardchan on Jun 15 2023, 4:21 PM.

Details

Summary

Due to logic in the 64-bit allocator, the smallest allocation we can zx_vmar_allocate is 2^37 bytes, but this is too large to allocate for the standalone lsan allocator on a 39-bit VMA. This leads to the zx_vmar_allocate call when initially setting up the allocator to fail. This is similar to what android experiences on a 64-bit system with a small vma. (See sanitizer_allocator_test.cpp).

This effectively reverts f6c4808d95221a5838e14474d95c6fe85bb1488a and has Fuchsia use the 32-bit allocator for RISCV.

Diff Detail

Event Timeline

leonardchan created this revision.Jun 15 2023, 4:21 PM
Herald added a project: Restricted Project. · View Herald TranscriptJun 15 2023, 4:21 PM
leonardchan requested review of this revision.Jun 15 2023, 4:21 PM
mcgrathr accepted this revision.Jun 15 2023, 4:23 PM
mcgrathr added reviewers: Caslyn, fabio-d.
This revision is now accepted and ready to land.Jun 15 2023, 4:24 PM
Caslyn accepted this revision.Jun 15 2023, 4:28 PM
leonardchan closed this revision.Jun 15 2023, 4:30 PM

Woops. Forgot to add the differential revision: bit to the commit, but this was submitted in 17623e96b5b84c0868fe6b4a1456e3d7da275c95.