-
Notifications
You must be signed in to change notification settings - Fork 473
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add UBSan build support and UBSan CI workflow #2298
Conversation
Verified: All test passed with no ubsan error in My M1 MacOS with |
Could we also add it to the worflow matrix in this PR? |
Previously I think we should add after some issue is fixed, let me add it now. |
b85b588
to
b9ed2b0
Compare
This patch fix a ub in rocksdb 😅, the |
f3cbeea
to
000edde
Compare
CMakeLists.txt
Outdated
else() | ||
message(FATAL_ERROR "Cannot use UBSAN without clang or gcc >= 5.1") | ||
endif() | ||
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -fsanitize=undefined -fno-sanitize-recover=all") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ahh sorry, my idea is to move -fno-sanitize-recover=all
out of if
, to prevent repeated long statement.
Not add it here.
CMakeLists.txt
Outdated
else() | ||
message(FATAL_ERROR "Cannot use UBSAN without clang or gcc >= 5.1") | ||
endif() | ||
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -fsanitize=undefined -fno-sanitize-recover=all") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -fsanitize=undefined -fno-sanitize-recover=all") | |
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -fsanitize=undefined") | |
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-sanitize-recover=all") | |
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fno-sanitize-recover=all") |
Quality Gate failedFailed conditions |
No description provided.