This is an archive of the discontinued LLVM Phabricator instance.

[asan] Add missing #include of sanitizer_platform.h
ClosedPublic

Authored by mcgrathr on Jan 26 2022, 4:43 PM.

Details

Summary

The "asan/asan_mapping.h" header relies on sanitizer_platform.h
macros, but doesn't directly include the header. All the existing
uses until recently happened to be in places where some other header
had indirectly included sanitizer_platform.h first. The addition of
asan_rtl_x86_64.S was the first place to use "asan/asan_mapping.h"
alone. It so happens that its uses of the macros make having no
macros defined equivalent to SANITIZER_LINUX, so this did not affect
Linux builds. But the assembly constants in asan_rtl_x86_64.S were
wrong for Fuchsia when SANITIZER_FUCHSIA was not properly defined.

Diff Detail

Event Timeline

mcgrathr created this revision.Jan 26 2022, 4:43 PM
mcgrathr requested review of this revision.Jan 26 2022, 4:43 PM
Herald added a project: Restricted Project. · View Herald TranscriptJan 26 2022, 4:43 PM
Herald added a subscriber: Restricted Project. · View Herald Transcript
vitalybuka accepted this revision.Jan 26 2022, 4:50 PM
This revision is now accepted and ready to land.Jan 26 2022, 4:50 PM
This revision was landed with ongoing or failed builds.Jan 26 2022, 6:19 PM
This revision was automatically updated to reflect the committed changes.