This is an archive of the discontinued LLVM Phabricator instance.

Activate UBSan for Power
ClosedPublic

Authored by seurer on Mar 31 2015, 12:03 PM.

Details

Summary

This activates UBSan for the power architecture.

One test case is updated to allow for differences between power and other architectures in behavior when returning from main in certain instances.

Diff Detail

Event Timeline

seurer updated this revision to Diff 22994.Mar 31 2015, 12:03 PM
seurer retitled this revision from to Activate UBSan for Power.
seurer updated this object.
seurer edited the test plan for this revision. (Show Details)
seurer added a subscriber: Unknown Object (MLST).
wschmidt edited edge metadata.Mar 31 2015, 1:55 PM

One small concern inline...

projects/compiler-rt/test/ubsan/TestCases/Float/cast-overflow.cpp
91

Probably should make test_int static or filescope, as otherwise the compiler is within its rights to optimize this away despite the exception. Same comment applies several more times below.

seurer added inline comments.Mar 31 2015, 2:06 PM
projects/compiler-rt/test/ubsan/TestCases/Float/cast-overflow.cpp
91

Originally I had them as volatile but that changed the types in the error messages so I dropped it. I will switch them to static.

wschmidt accepted this revision.Mar 31 2015, 2:14 PM
wschmidt edited edge metadata.

LGTM with that change. Thanks!

This revision is now accepted and ready to land.Mar 31 2015, 2:14 PM
seurer closed this revision.Apr 1 2015, 8:40 AM

Committed revision 233813.

Great. I've submitted r233862 to make sure we run check-ubsan on
http://lab.llvm.org:8011/builders/sanitizer-ppc64-linux1