Skip to content
This repository was archived by the owner on Mar 22, 2023. It is now read-only.

Commit fc4117b

Browse files
committed
tests: disable incompatible tests under UBSAN
p_ext_0_none fails with: "runtime error: shift exponent 127 is too large for 32-bit type 'int'" concurrent_hash_map_layout_0_none fails with: "runtime error: reference binding to null pointer of type ..."
1 parent 447cd0f commit fc4117b

1 file changed

Lines changed: 10 additions & 4 deletions

File tree

tests/CMakeLists.txt

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -210,8 +210,11 @@ if(NOT USE_ASAN)
210210
add_test_generic(NAME ptr_arith TRACERS none)
211211
endif()
212212

213-
build_test(p_ext p_ext/p_ext.cpp)
214-
add_test_generic(NAME p_ext TRACERS none pmemcheck)
213+
if(NOT USE_UBSAN)
214+
# We want to test overflow which is reported by UBSAN
215+
build_test(p_ext p_ext/p_ext.cpp)
216+
add_test_generic(NAME p_ext TRACERS none pmemcheck)
217+
endif()
215218

216219
if(NOT WIN32)
217220
build_test(shared_mutex_posix mutex/shared_mutex_posix.cpp)
@@ -582,8 +585,11 @@ if(TEST_CONCURRENT_HASHMAP)
582585
build_test(concurrent_hash_map_singlethread concurrent_hash_map/concurrent_hash_map_singlethread.cpp)
583586
add_test_generic(NAME concurrent_hash_map_singlethread TRACERS none memcheck pmemcheck)
584587

585-
build_test(concurrent_hash_map_layout concurrent_hash_map/concurrent_hash_map_layout.cpp)
586-
add_test_generic(NAME concurrent_hash_map_layout TRACERS none)
588+
if(NOT USE_UBSAN)
589+
# ASSERT_ALIGNED_FIELD is not compatible with UBSAN
590+
build_test(concurrent_hash_map_layout concurrent_hash_map/concurrent_hash_map_layout.cpp)
591+
add_test_generic(NAME concurrent_hash_map_layout TRACERS none)
592+
endif()
587593

588594
if(GDB_FOUND)
589595
build_test(concurrent_hash_map_rehash_break concurrent_hash_map_rehash_break/concurrent_hash_map_rehash_break.cpp)

0 commit comments

Comments
 (0)