This is an archive of the discontinued LLVM Phabricator instance.

[ASan] Removed code from unaligned case which was causing wrong reporting.
AbandonedPublic

Authored by kstoimenov on Apr 7 2022, 7:51 AM.

Details

Reviewers
eugenis
Summary

The instrumentUnusualSizeOrAlignment was originally refactored out in D8198. At that time callbacks probably handled the unaligned case properly? Now it is causing a wrong "unknown-crash" message instead of 'global-buffer-overflow' because it is looking at the wrong place in shadow memory.

Diff Detail

Event Timeline

kstoimenov created this revision.Apr 7 2022, 7:51 AM
Herald added a project: Restricted Project. · View Herald TranscriptApr 7 2022, 7:51 AM
Herald added a subscriber: hiraditya. · View Herald Transcript
kstoimenov requested review of this revision.Apr 7 2022, 7:51 AM
Herald added projects: Restricted Project, Restricted Project. · View Herald TranscriptApr 7 2022, 7:51 AM
Herald added subscribers: llvm-commits, Restricted Project. · View Herald Transcript
kstoimenov edited the summary of this revision. (Show Details)Apr 7 2022, 7:55 AM
kstoimenov edited the summary of this revision. (Show Details)Apr 7 2022, 8:00 AM
kstoimenov added a reviewer: eugenis.
eugenis added inline comments.Apr 7 2022, 2:13 PM
llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp
1874

I'm confused - AsanMemoryAccessCallbackSized callbacks go to __asan_loadN / __asan_storeN versions which should handle unaligned properly.

kstoimenov abandoned this revision.Apr 7 2022, 2:31 PM