diff --git a/.gdb_history b/.gdb_history new file mode 100644 index 0000000000..be908bac45 --- /dev/null +++ b/.gdb_history @@ -0,0 +1,18 @@ +br z_cbvprintf_impl +r +ni +br z_cbvprintf_impl +r +ni +x/200i $rip +x/2000i $rip +ni +ni +br z_cbvprintf_impl +r +ni +ni +r +ni +r +vmmap diff --git a/arch/posix/CMakeLists.txt b/arch/posix/CMakeLists.txt index 4b39857a29..1e57132865 100644 --- a/arch/posix/CMakeLists.txt +++ b/arch/posix/CMakeLists.txt @@ -159,9 +159,10 @@ endif() # (supported by current gcc's as well) # if(CONFIG_CFI) - zephyr_compile_options(-flto -fvisibility=hidden) - target_compile_options(native_simulator INTERFACE "-flto -fvisibility=hidden -fno-sanitize-trap=cfi") - target_link_options(native_simulator INTERFACE "-flto") + zephyr_compile_options(-flto -fvisibility=hidden -fno-sanitize-trap=cfi -fsanitize-ignorelist=/home/patrick/repos/uni/idp/zephyrtest/zephyr/ignore_list.txt) + target_link_options(native_simulator INTERFACE "-flto -fvisibility=hidden -fno-sanitize-trap=cfi -fsanitize-ignorelist=/home/patrick/repos/uni/idp/zephyrtest/zephyr/ignore_list.txt") + target_compile_options(native_simulator INTERFACE "-flto -fvisibility=hidden -fno-sanitize-trap=cfi -fsanitize-ignorelist=/home/patrick/repos/uni/idp/zephyrtest/zephyr/ignore_list.txt") + zephyr_link_libraries("-flto") list(APPEND LLVM_SANITIZERS "cfi") endif() diff --git a/ignore_list.txt b/ignore_list.txt new file mode 100644 index 0000000000..aab45b8740 --- /dev/null +++ b/ignore_list.txt @@ -0,0 +1,2 @@ +src:*/native_simulator/* +fun:z_cbvprintf_impl diff --git a/main.c b/main.c new file mode 100644 index 0000000000..cac7e2f391 --- /dev/null +++ b/main.c @@ -0,0 +1,6 @@ +#include + +int main() +{ + printf("lololol"); +} diff --git a/samples/basic/blinky/prj.conf b/samples/basic/blinky/prj.conf index 5a9d1ac87a..2d7d146afb 100644 --- a/samples/basic/blinky/prj.conf +++ b/samples/basic/blinky/prj.conf @@ -2,7 +2,6 @@ CONFIG_GPIO=y #CONFIG_ASAN=y CONFIG_CFI=y CONFIG_LLVM_USE_LLD=y -CONFIG_COMPILER_RT_RTLIB=y #CONFIG_DEBUG=y #CONFIG_DEBUG_INFO=y diff --git a/scripts/native_simulator/Makefile b/scripts/native_simulator/Makefile index 3b3ef01c1f..242ef9c0fc 100644 --- a/scripts/native_simulator/Makefile +++ b/scripts/native_simulator/Makefile @@ -134,7 +134,7 @@ ${NSI_EXE}: ${NSI_BUILD_PATH}/${RUNNER_LIB} ${LOCALIZED_EMBSW} ${NSI_EXTRA_LIBS} -B /nix/store/dbwp0scbb0rk78m636sb7cvycz8xzgyh-glibc-2.39-52/lib \ -B /nix/store/qfqjymymsd2x29yknsgllfiq1h64s3f4-gcc-12.3.0/lib/gcc/x86_64-unknown-linux-gnu/12.3.0/ \ -L /nix/store/qfqjymymsd2x29yknsgllfiq1h64s3f4-gcc-12.3.0/lib/gcc/x86_64-unknown-linux-gnu/12.3.0/ \ - -lclang_rt.ubsan_standalone-x86_64 + -lclang_rt.ubsan_standalone Makefile: ;