Page MenuHomePhabricator

[TSan] Improve handling of stack pointer mangling in {set,long}jmp, pt.6
AbandonedPublic

Authored by yln on Jul 1 2019, 10:45 AM.

Details

Reviewers
dvyukov
Summary

Since we don't clobber x1/w1 (2nd argument) anymore, we don't have to
save/restore it.

Event Timeline

yln created this revision.Jul 1 2019, 10:45 AM
Herald added projects: Restricted Project, Restricted Project. · View Herald TranscriptJul 1 2019, 10:45 AM
Herald added subscribers: llvm-commits, Restricted Project, javed.absar, kubamracek. · View Herald Transcript
dvyukov accepted this revision.Jul 1 2019, 10:11 PM

Rubber stamp LGTM, if you want a real review please ask somebody else. But if you are sure it's good and covered by tests, submit.

This revision is now accepted and ready to land.Jul 1 2019, 10:11 PM
yln added a comment.Jul 2 2019, 5:59 PM

Rubber stamp LGTM, if you want a real review please ask somebody else. But if you are sure it's good and covered by tests, submit.

I have learnt that one can never be 100% sure ;)

We have the following tests that cover this (--filter jmp):

PASS: ThreadSanitizer-arm64e-ios :: fiber_longjmp.cc (1 of 6)
PASS: ThreadSanitizer-arm64e-ios :: longjmp.cc (2 of 6)
PASS: ThreadSanitizer-arm64e-ios :: longjmp2.cc (3 of 6)
PASS: ThreadSanitizer-arm64e-ios :: longjmp3.cc (4 of 6)
PASS: ThreadSanitizer-arm64e-ios :: longjmp4.cc (5 of 6)
PASS: ThreadSanitizer-arm64e-ios :: signal_longjmp.cc (6 of 6)
yln abandoned this revision.Jul 5 2019, 2:36 PM

Still need to save/restore x1 (even if we don't clobber it ourselves).
Same as: https://reviews.llvm.org/D63946