Page MenuHomePhabricator

[scudo][standalone] Fix for releaseToOS prior to init

Authored by cryptoad on Nov 21 2019, 10:59 AM.



cferris@ found an issue where calling releaseToOS prior to any other
heap operation would lead to a crash, due to the allocator not being
properly initialized (it was discovered via mallopt).

The fix is to call initThreadMaybe prior to calling releaseToOS for
the Primary.

Add a test that crashes prior to fix.

Diff Detail

Event Timeline

cryptoad created this revision.Nov 21 2019, 10:59 AM
Herald added projects: Restricted Project, Restricted Project. · View Herald TranscriptNov 21 2019, 10:59 AM
Herald added a subscriber: Restricted Project. · View Herald Transcript
hctim accepted this revision.Nov 25 2019, 8:26 AM
This revision is now accepted and ready to land.Nov 25 2019, 8:26 AM
This revision was automatically updated to reflect the committed changes.