This is an archive of the discontinued LLVM Phabricator instance.

[hwasan] Properly restore SP tag on exceptions
ClosedPublic

Authored by fmayer on Jun 2 2023, 2:44 PM.

Diff Detail

Event Timeline

fmayer created this revision.Jun 2 2023, 2:44 PM
Herald added a project: Restricted Project. · View Herald TranscriptJun 2 2023, 2:44 PM
Herald added a subscriber: Enna1. · View Herald Transcript
fmayer requested review of this revision.Jun 2 2023, 2:44 PM
Herald added a project: Restricted Project. · View Herald TranscriptJun 2 2023, 2:44 PM
Herald added a subscriber: Restricted Project. · View Herald Transcript
vitalybuka accepted this revision.Jun 2 2023, 2:49 PM
vitalybuka added inline comments.
compiler-rt/test/hwasan/TestCases/try-catch.cpp
71

Filecheck and printf are unnecessary
exit code is enough

81

just
assert(pthread_attr_init(&attr) == 0)

This revision is now accepted and ready to land.Jun 2 2023, 2:49 PM
fmayer marked an inline comment as done.Jun 2 2023, 2:51 PM
fmayer added inline comments.
compiler-rt/test/hwasan/TestCases/try-catch.cpp
71

I don't think we should change the existing test in this CL. We can do that in a follow up.

81

Why? This makes debugging easier because it tells you what's wrong.

fmayer marked an inline comment as done.Jun 2 2023, 2:53 PM
fmayer added inline comments.
compiler-rt/test/hwasan/TestCases/try-catch.cpp
81

Oh. Or do you mean this one in particular? I guess, that one shouldn't fail anyway.

fmayer updated this revision to Diff 528001.Jun 2 2023, 2:56 PM
fmayer marked an inline comment as done.

assert

fmayer updated this revision to Diff 528002.Jun 2 2023, 2:57 PM

more assert

This revision was automatically updated to reflect the committed changes.
kda added a subscriber: kda.Jun 5 2023, 12:31 AM

This looks to be breaking HWASAN sanitizer buildbot:
https://lab.llvm.org/buildbot/#/builders/236/builds/4452

seems to be try-catch.cpp

fmayer added a comment.Jun 5 2023, 9:12 AM

This looks to be breaking HWASAN sanitizer buildbot:
https://lab.llvm.org/buildbot/#/builders/236/builds/4452

seems to be try-catch.cpp

thinks. looking, i cannot reproduce on my own phone :(

fmayer reopened this revision.Jun 5 2023, 10:27 AM
This revision is now accepted and ready to land.Jun 5 2023, 10:27 AM
fmayer planned changes to this revision.Jun 5 2023, 10:27 AM

This looks to be breaking HWASAN sanitizer buildbot:
https://lab.llvm.org/buildbot/#/builders/236/builds/4452

seems to be try-catch.cpp

thinks. looking, i cannot reproduce on my own phone :(

reverted for now until i figure out why it fails on the (old) buildbot phone.

fmayer updated this revision to Diff 528573.Jun 5 2023, 2:17 PM

fix bug around tls

This revision is now accepted and ready to land.Jun 5 2023, 2:17 PM
fmayer retitled this revision from Properly restore SP tag on exceptions to [hwasan] Properly restore SP tag on exceptions.Jun 5 2023, 2:30 PM
vitalybuka accepted this revision.Jun 5 2023, 3:16 PM
vitalybuka added inline comments.
compiler-rt/test/hwasan/TestCases/try-catch.cpp
81

all : less lines, and easier to read

but it's OK either way

This revision was automatically updated to reflect the committed changes.