This is an archive of the discontinued LLVM Phabricator instance.

[MIPS][AddressSanitizer] Fix the shadow offset hook for the n32 ABI
ClosedPublic

Authored by dmilosevic141 on Jun 6 2022, 3:27 AM.

Details

Summary

Currently, LLVM doesn't have the correct shadow offset mapping for the n32 ABI.
This patch introduces the correct shadow offset value for the n32 ABI - 1ULL << 29.

Diff Detail

Event Timeline

dmilosevic141 created this revision.Jun 6 2022, 3:27 AM
Herald added a project: Restricted Project. · View Herald TranscriptJun 6 2022, 3:27 AM
dmilosevic141 requested review of this revision.Jun 6 2022, 3:27 AM
Herald added a project: Restricted Project. · View Herald TranscriptJun 6 2022, 3:27 AM
xry111 added a subscriber: xry111.Jun 7 2022, 1:15 AM

Thanks for this.

llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp
546

Is this even possible?

Removed the unnecessary check for the N32 ABI if LongSize is equal to 64.

llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp
546

Indeed, the N32 ABI has 32-bit longs. Thanks!

This revision is now accepted and ready to land.Jun 23 2022, 8:04 AM
This revision was landed with ongoing or failed builds.Jul 6 2022, 3:45 AM
This revision was automatically updated to reflect the committed changes.