This is an archive of the discontinued LLVM Phabricator instance.

[asan] Set alignment of __asan_global_* globals to sizeof(GlobalStruct)
ClosedPublic

Authored by kubamracek on Jan 11 2017, 11:13 AM.

Details

Summary

When using profiling and ASan together (-fprofile-instr-generate -fcoverage-mapping -fsanitize=address), at least on Darwin, the section of globals that ASan emits (__asan_globals) is misaligned and starts at an odd offset. This really doesn't have anything to do with profiling, but it triggers the issue because profiling emits a string section, which can have arbitrary size.

Diff Detail

Event Timeline

kubamracek retitled this revision from to [asan] Set alignment of __asan_global_* globals to sizeof(GlobalStruct).
kubamracek updated this object.
kubamracek added reviewers: rnk, kcc, eugenis, filcab, vitalybuka.
kubamracek set the repository for this revision to rL LLVM.
kubamracek added a project: Restricted Project.
kubamracek added subscribers: llvm-commits, zaks.anna.
eugenis accepted this revision.Jan 11 2017, 1:19 PM
eugenis edited edge metadata.
This revision is now accepted and ready to land.Jan 11 2017, 1:19 PM
This revision was automatically updated to reflect the committed changes.