This is an archive of the discontinued LLVM Phabricator instance.

[compiler-rt] [tsan] Enable intercept setjmp/longjmp for AArch64
ClosedPublic

Authored by zatrazz on Nov 12 2015, 11:28 AM.

Details

Summary

This patch adds assembly routines to enable setjmp/longjmp for aarch64
on linux. It fixes:

  • test/tsan/longjmp2.cc
  • test/tsan/longjmp3.cc
  • test/tsan/longjmp4.cc
  • test/tsan/signal_longjmp.cc

I also checked with perlbench from specpu2006 (it fails to run
with missing setjmp/longjmp intrumentation).

Diff Detail

Event Timeline

zatrazz updated this revision to Diff 40073.Nov 12 2015, 11:28 AM
zatrazz retitled this revision from to [compiler-rt] [tsan] Enable intercept setjmp/longjmp for AArch64.
zatrazz updated this object.
zatrazz added a subscriber: llvm-commits.
samsonov added inline comments.Nov 12 2015, 5:25 PM
lib/tsan/rtl/tsan_interceptors.cc
454
# elif defined(__aarch64__)
  uptr mangled_sp = env[13];
#else
  uptr mangled_sp = env[6];
#endif
zatrazz added inline comments.Nov 13 2015, 4:07 AM
lib/tsan/rtl/tsan_interceptors.cc
454

Wouldn't be better:

#elif defined(SANITIZER_LINUX)
# ifdef  __aarch64__
  uptr mangled_sp = env[13];
#else
  uptr mangled_sp = env[6];
#endif

?

samsonov added inline comments.Nov 13 2015, 11:49 AM
lib/tsan/rtl/tsan_interceptors.cc
454

Okay (but please make sure indentation of #directives is fine).

zatrazz accepted this revision.Nov 16 2015, 5:58 AM
zatrazz added a reviewer: zatrazz.

Accepted based on samsonov last comment.

This revision is now accepted and ready to land.Nov 16 2015, 5:58 AM
zatrazz closed this revision.Nov 16 2015, 5:58 AM