This is an archive of the discontinued LLVM Phabricator instance.

[scudo] Fix definition of SCUDO_SMALL_STACK_DEPOT.
ClosedPublic

Authored by cferris on Aug 21 2023, 2:52 PM.

Details

Summary

The SCUDO_FUZZ macro is either defined or not defined. The previous
code assumed it had a one or zero value, so change the setting of
SCUDO_SMALL_STACK_DEPOT based on defined(SCUDO_FUZZ).

Diff Detail

Event Timeline

cferris created this revision.Aug 21 2023, 2:52 PM
Herald added a project: Restricted Project. · View Herald TranscriptAug 21 2023, 2:52 PM
cferris requested review of this revision.Aug 21 2023, 2:52 PM
Herald added a project: Restricted Project. · View Herald TranscriptAug 21 2023, 2:52 PM
Herald added a subscriber: Restricted Project. · View Herald Transcript
Chia-hungDuan accepted this revision.Aug 21 2023, 2:57 PM
This revision is now accepted and ready to land.Aug 21 2023, 2:57 PM
ahomescu accepted this revision.Aug 21 2023, 3:18 PM

I see what happened: the old code was relying on -DSCUDO_FUZZ setting it to 1, but leaving it undefined defaults it to 0. On a second look, I realized the latter is only true for #if but not macros from #define.

This revision was automatically updated to reflect the committed changes.