Skip to content

Commit c4d9fdb

Browse files
authored
Merge pull request #2366 from RossBrunton/ross/asancfi
Disable CFI checks when ASAN is specified
2 parents 0f0703b + 3ed2dcf commit c4d9fdb

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

.github/workflows/build-fuzz-reusable.yml

-3
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,6 @@ jobs:
4747
cmake --build build -j $(nproc)
4848
4949
- name: Configure CMake
50-
# CFI sanitization (or flto?) seems to cause linking to fail
51-
# https://github.com/oneapi-src/unified-runtime/issues/2323
5250
run: >
5351
cmake
5452
-B${{github.workspace}}/build
@@ -60,7 +58,6 @@ jobs:
6058
-DUR_USE_ASAN=ON
6159
-DUR_USE_UBSAN=ON
6260
-DUR_BUILD_ADAPTER_L0=ON
63-
-DUR_USE_CFI=OFF
6461
-DUR_LEVEL_ZERO_LOADER_LIBRARY=${{github.workspace}}/level-zero/build/lib/libze_loader.so
6562
-DUR_LEVEL_ZERO_INCLUDE_DIR=${{github.workspace}}/level-zero/include/
6663
-DUR_DPCXX=${{github.workspace}}/dpcpp_compiler/bin/clang++

cmake/helpers.cmake

+6
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,12 @@ if(CMAKE_SYSTEM_NAME STREQUAL Linux)
6363
check_cxx_compiler_flag("-fstack-clash-protection" CXX_HAS_FSTACK_CLASH_PROTECTION)
6464
endif()
6565

66+
if (UR_USE_CFI AND UR_USE_ASAN)
67+
message(WARNING "Both UR_USE_CFI and UR_USE_ASAN are ON. "
68+
"Due to build errors, this is unsupported; CFI checks will be disabled")
69+
set(UR_USE_CFI OFF)
70+
endif()
71+
6672
if (UR_USE_CFI)
6773
set(SAVED_CMAKE_REQUIRED_FLAGS ${CMAKE_REQUIRED_FLAGS})
6874
set(CMAKE_REQUIRED_FLAGS "-flto -fvisibility=hidden")

0 commit comments

Comments
 (0)