llvm-project/libcxx/test/std/atomics/atomics.flag
Eric Fiselier 990952b664 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
2016-06-19 07:08:27 +00:00
..
atomic_flag_clear.pass.cpp Fix various undefined behavior found by UBSan. 2016-06-19 07:08:27 +00:00
atomic_flag_clear_explicit.pass.cpp Fix various undefined behavior found by UBSan. 2016-06-19 07:08:27 +00:00
atomic_flag_test_and_set.pass.cpp
atomic_flag_test_and_set_explicit.pass.cpp
clear.pass.cpp Fix various undefined behavior found by UBSan. 2016-06-19 07:08:27 +00:00
copy_assign.fail.cpp
copy_ctor.fail.cpp
copy_volatile_assign.fail.cpp
default.pass.cpp Fix unused variable warnings in atomic tests 2015-07-18 21:40:37 +00:00
init.pass.cpp [libcxx] Allow use of <atomic> in C++03. Try 3. 2015-08-19 17:21:46 +00:00
test_and_set.pass.cpp