This is an archive of the discontinued LLVM Phabricator instance.

[ASan] Reenable __builtin_setjmp test on PowerPC, disable on SystemZ.
ClosedPublic

Authored by koriakin on Apr 28 2016, 6:56 AM.

Details

Summary

Since __builtin_setjmp has been fixed by rL267943, the test now works
on PowerPC. Enable it.

On the other hand, the SystemZ backend doesn't currently support
__builtin_setjmp. Disable it.

Diff Detail

Repository
rL LLVM

Event Timeline

koriakin retitled this revision from to [ASan] Change condition for __builtin_longjmp test..
koriakin updated this object.
koriakin added reviewers: kcc, eugenis.
koriakin set the repository for this revision to rL LLVM.
koriakin added a project: Restricted Project.
koriakin added a subscriber: llvm-commits.
joerg added a subscriber: joerg.Apr 28 2016, 9:37 AM

That's not true. __builtin_longjmp is (currently) supported on X86, PowerPC and ARM. Support for SPARC is currently being worked on.

That's not true. __builtin_longjmp is (currently) supported on X86, PowerPC and ARM. Support for SPARC is currently being worked on.

Hm, fair enough. I'll try to figure out what's wrong with this test on PowerPC, then.

That's not true. __builtin_longjmp is (currently) supported on X86, PowerPC and ARM. Support for SPARC is currently being worked on.

Hm, fair enough. I'll try to figure out what's wrong with this test on PowerPC, then.

Ugh, clang miscompiles __builtin_setjmp on PowerPC when using internal assembler - there's a stray 0 word in the code section, seems it tries to print an invalid MachineInstr somehow. I'll fix that.

However, I'm not sure about ARM - the emitted code looks OK to me, and I don't have the hardware to run the test. Could someone shed some light here?

Btw, what's so useful about __builtin_longjmp/setjmp that someone's implementing it on SPARC? I thought it was just an ancient exception handling artifact...

koriakin retitled this revision from [ASan] Change condition for __builtin_longjmp test. to [ASan] Reenable __builtin_setjmp test on PowerPC, disable on SystemZ..
koriakin updated this object.

Since the test can actually work on multiple platforms (all of them presumably, given support from backend), let's keep the blacklist. However, disable it for the upcoming SystemZ port, which currently doesn't support the builtin, and reenable it for PowerPC, whose builtin has just been fixed.

aizatsky accepted this revision.Apr 28 2016, 2:48 PM
aizatsky added a reviewer: aizatsky.
This revision is now accepted and ready to land.Apr 28 2016, 2:48 PM
koriakin edited edge metadata.

Turns out this file doesn't include sanitizer_common.h, so we can't use SANITIZER_* defines - fixed to use s390 and friends.

This revision was automatically updated to reflect the committed changes.