File indexing completed on 2024-04-21 04:36:23

0001 #!/bin/bash
0002 #
0003 # build KDevelop with -fsanitize=address,undefined and then source this script
0004 #
0005 
0006 kdev_source_dir=$(readlink -f $(dirname ${BASH_SOURCE[0]}))
0007 
0008 # optionally set fast_unwind_on_malloc=false to get full backtraces even when framepointers are missing
0009 # but that is very slow
0010 export LSAN_OPTIONS=print_suppressions=0,suppressions=$kdev_source_dir/lsan.supp,fast_unwind_on_malloc=true
0011 
0012 export UBSAN_OPTIONS=print_stacktrace=1,suppressions=$kdev_source_dir/ubsan.supp
0013 
0014 # there seems to be a funky clash with sigaltstack usage in llvm, so disable it for the sanitizers
0015 # see also: https://github.com/google/sanitizers/issues/849
0016 export ASAN_OPTIONS=detect_stack_use_after_return=1,use_sigaltstack=0