Skip to content

Commit

Permalink
fixing some clang warnings&ubsan
Browse files Browse the repository at this point in the history
  • Loading branch information
nift4 committed Aug 2, 2024
1 parent 8e7dc9c commit b6cc83e
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
4 changes: 2 additions & 2 deletions app/src/main/cpp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,5 @@ add_library(${CMAKE_PROJECT_NAME} SHARED app.cpp)
# can link libraries from various origins, such as libraries defined in this
# build script, prebuilt third-party libraries, or Android system libraries.
target_link_libraries(${CMAKE_PROJECT_NAME} droidboot_gui)
target_compile_options(${CMAKE_PROJECT_NAME} PUBLIC -fsanitize=address -fsanitize-recover=address -fno-omit-frame-pointer)
target_link_options(${CMAKE_PROJECT_NAME} PUBLIC -fsanitize=address -fsanitize-recover=address)
target_compile_options(${CMAKE_PROJECT_NAME} PUBLIC -fsanitize=address -fsanitize=undefined -fno-omit-frame-pointer)
target_link_options(${CMAKE_PROJECT_NAME} PUBLIC -fsanitize=address -fsanitize=undefined)
3 changes: 1 addition & 2 deletions app/src/main/resources/lib/arm64-v8a/wrap.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@ elif [ "$os_version" -eq "28" ]; then
else
cmd="$cmd -XjdwpProvider:adbconnection -XjdwpOptions:suspend=n,server=y $@"
fi
#export ASAN_OPTIONS=log_to_syslog=true,allow_user_segv_handler=1,detect_stack_use_after_return=true,check_initialization_order=true,halt_on_error=false
export ASAN_OPTIONS=log_to_syslog=true
export ASAN_OPTIONS=log_to_syslog=true,allow_user_segv_handler=1,detect_stack_use_after_return=true,check_initialization_order=true
ASAN_LIB=$(ls "$HERE"/libclang_rt.asan-*-android.so)
if [ -f "$HERE/libc++_shared.so" ]; then
# Workaround for https://github.com/android-ndk/ndk/issues/988.
Expand Down

0 comments on commit b6cc83e

Please sign in to comment.