This is an archive of the discontinued LLVM Phabricator instance.

AddressSanitizer: 64-bit SPARC/Linux port
ClosedPublic

Authored by ebotcazou on Feb 20 2019, 3:04 AM.

Details

Summary

This patch contains the bits required to make the AddressSanitizer work on SPARC64/Linux (SPARC-T4 and later).

Patch by Eric Botcazou.

Diff Detail

Event Timeline

ebotcazou created this revision.Feb 20 2019, 3:04 AM
ro added a subscriber: ro.Feb 20 2019, 4:20 AM
vitalybuka accepted this revision.Feb 20 2019, 10:50 AM
vitalybuka added a subscriber: vitalybuka.

LGTM with "git clang-format -f --style=file --extensions=inc,cc,h,c,cpp HEAD^"

compiler-rt/lib/asan/asan_mapping_sparc64.h
32

I suspect this is not clang-formated

This revision is now accepted and ready to land.Feb 20 2019, 10:50 AM
vitalybuka requested changes to this revision.Feb 20 2019, 10:51 AM
vitalybuka added inline comments.
compiler-rt/lib/asan/asan_mapping_sparc64.h
4

Please fix the licence

This revision now requires changes to proceed.Feb 20 2019, 10:51 AM
ebotcazou updated this revision to Diff 187793.Feb 21 2019, 7:34 AM
ebotcazou marked 2 inline comments as done.
This comment was removed by ebotcazou.
ebotcazou updated this revision to Diff 187794.Feb 21 2019, 7:37 AM

License and formatting fixed.

vitalybuka added inline comments.Feb 21 2019, 11:20 AM
compiler-rt/lib/asan/asan_allocator.h
142

@krytarowski I assumed that worked on Solaris, probably only x86

krytarowski added inline comments.Feb 21 2019, 6:59 PM
compiler-rt/lib/asan/asan_allocator.h
142

I'm not sure about Linux, but on NetBSD we need to use defined(__sparc64__) (or && defined(_LP64)) as defined(__sparc__) catches both ISA variations 32-bit and 64-bit.

I can see that we only test x86 32-bit and 64-bit in our releng setup. SPARC 32-bit and 64-bit is verified just with UBSan.

vitalybuka accepted this revision.Feb 22 2019, 10:44 AM
This revision is now accepted and ready to land.Feb 22 2019, 10:44 AM
brad marked an inline comment as done.Mar 2 2019, 2:02 PM
brad added a subscriber: brad.
brad added inline comments.
compiler-rt/lib/asan/asan_allocator.h
142

Regarding __sparc__ this is also the case on OpenBSD/sparc64.

vitalybuka edited the summary of this revision. (Show Details)Mar 12 2019, 11:20 AM
This revision was automatically updated to reflect the committed changes.