summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/Sparc/SparcTargetMachine.cpp
diff options
context:
space:
mode:
authorEric Fiselier <eric@efcs.ca>2016-06-19 07:08:27 +0000
committerEric Fiselier <eric@efcs.ca>2016-06-19 07:08:27 +0000
commit990952b6644e79da08c6925bddedff7c3b3ebe8a (patch)
tree7f0b05b23564e09db909dca5a6472b011de92cd8 /llvm/lib/Target/Sparc/SparcTargetMachine.cpp
parentbe13be47bac8b0d35283cf1525e51a7d1d6e6455 (diff)
downloadbcm5719-llvm-990952b6644e79da08c6925bddedff7c3b3ebe8a.tar.gz
bcm5719-llvm-990952b6644e79da08c6925bddedff7c3b3ebe8a.zip
Fix various undefined behavior found by UBSan.
* Fix non-null violation in strstream.cpp Overflow was calling memcpy with a null parameter and a size of 0. * Fix std/atomics/atomics.flag/ tests: a.test_and_set() was reading from an uninitialized atomic, but wasn't using the value. The tests now clear the flag before performing the first test_and_set. This allows UBSAN to test that clear doesn't read an invalid value. * Fix std/experimental/algorithms/alg.random.sample/sample.pass.cpp The tests were dereferencing a past-the-end pointer to an array so that they could do pointer arithmetic with it. Instead of dereference the iterator I changed the tests to use the special 'base()' test iterator method. * Add -fno-sanitize=float-divide-by-zero to suppress division by zero UBSAN diagnostics. The tests that cause float division by zero are explicitly aware that they are doing that. Since this is well defined for IEEE floats suppress the warnings for now. llvm-svn: 273107
Diffstat (limited to 'llvm/lib/Target/Sparc/SparcTargetMachine.cpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud