-
Notifications
You must be signed in to change notification settings - Fork 3
Bump luzer with sanitizers support #133
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
base: master
Are you sure you want to change the base?
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,11 +16,20 @@ lapi_tests_make_lua_path(LUA_PATH | |
${CMAKE_CURRENT_SOURCE_DIR}/?.lua | ||
) | ||
|
||
set(DSO_SANITIZER_PATH "${PROJECT_BINARY_DIR}/luzer/build/luzer") | ||
set(DSO_ASAN_PATH "${DSO_SANITIZER_PATH}/asan_with_fuzzer.so") | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I would rather name it There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This should be addressed here, right? ligurio/luzer#38 |
||
set(DSO_UBSAN_PATH "${DSO_SANITIZER_PATH}/ubsan_with_fuzzer.so") | ||
|
||
if(ENABLE_ASAN OR ENABLE_UBSAN) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Maybe it is better to append the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Updated: --- a/tests/lapi/CMakeLists.txt
+++ b/tests/lapi/CMakeLists.txt
@@ -20,8 +20,12 @@ set(DSO_SANITIZER_PATH "${PROJECT_BINARY_DIR}/luzer/build/luzer")
set(DSO_ASAN_PATH "${DSO_SANITIZER_PATH}/asan_with_fuzzer.so")
set(DSO_UBSAN_PATH "${DSO_SANITIZER_PATH}/ubsan_with_fuzzer.so")
-if(ENABLE_ASAN OR ENABLE_UBSAN)
- set(LD_PRELOAD_LIBS "${DSO_ASAN_PATH}:${DSO_UBSAN_PATH}")
+if(ENABLE_ASAN)
+ list(APPEND LD_PRELOAD_LIBS ${DSO_ASAN_PATH})
+endif()
+
+if(ENABLE_UBSAN)
+ list(APPEND LD_PRELOAD_LIBS ${DSO_UBSAN_PATH})
endif()
list(APPEND TEST_ENV |
||
set(LD_PRELOAD_LIBS "${DSO_ASAN_PATH}:${DSO_UBSAN_PATH}") | ||
endif() | ||
|
||
list(APPEND TEST_ENV | ||
"LUA_PATH=${LUA_PATH};" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Minor: I suppose there is no need for There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
@@ -29,7 +33,7 @@ list(APPEND TEST_ENV
"LUA_CPATH=${LUA_CPATH};"
"ASAN_OPTIONS=detect_odr_violation=0;"
"LD_DYNAMIC_WEAK=1;"
- "LD_PRELOAD=${LD_PRELOAD_LIBS};"
+ "LD_PRELOAD=${LD_PRELOAD_LIBS}"
)
function(create_test) |
||
"LUA_CPATH=${LUA_CPATH};" | ||
"ASAN_OPTIONS=detect_odr_violation=0;" | ||
"LD_DYNAMIC_WEAK=1;" | ||
"LD_PRELOAD=${LD_PRELOAD_LIBS};" | ||
) | ||
|
||
function(create_test) | ||
|
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.
Don't forget to update this part after the ligurio/luzer#38 is merged.
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.
Added a reminder as a separate commit: