@@ -60,15 +60,46 @@ build:macos --host_action_env=CC=/opt/homebrew/opt/llvm/bin/clang
6060
6161# Windows specific asan setup
6262# common:asanwin --copt -fsanitize=address,bool,float-cast-overflow,integer-divide-by-zero,null,return,returns-nonnull-attribute,shift-exponent,signed-integer-overflow,unreachable,vla-bound
63- common:asanwin --copt -fsanitize=address,bool,float-cast-overflow,integer-divide-by-zero,null,return,returns-nonnull-attribute,shift-exponent,unreachable,vla-bound
64- common:asanwin --copt -fsanitize-address-use-after-scope
65- common:asanwin --copt -fno-sanitize-recover=all
63+ # common:asanwin --copt -fsanitize=address,bool,float-cast-overflow,integer-divide-by-zero,null,return,returns-nonnull-attribute,shift-exponent,unreachable,vla-bound
64+ # vptr is not support for "clang-cl"
65+ common:asanwin --copt -fsanitize=address,undefined,implicit-integer-truncation,implicit-integer-arithmetic-value-change,implicit-conversion,integer,nullability,float-divide-by-zero,local-bounds
6666common:asanwin --copt -fno-sanitize-ignorelist --copt -MD
67- common:asanwin --test_env=ASAN_OPTIONS=report_globals=0:detect_odr_violation=0
67+ #alignment,bool,builtin,bounds,array-bounds,enum,float-cast-overflow,integer-divide-by-zero,function,implicit-unsigned-integer-truncation,implicit-signed-integer-truncation,implicit-integer-sign-change,null,return,returns-nonnull-attribute,shift-exponent,unreachable,vla-bound
68+ common:asanwin --copt -fsanitize-address-use-after-scope
69+ common:asanwin --copt -fsanitize-address-globals-dead-stripping
70+ common:asanwin --copt -fsanitize-address-outline-instrumentation
71+ common:asanwin --copt -fsanitize-address-use-after-return=always
72+ common:asanwin --copt -fsanitize-stable-abi
73+ common:asanwin --copt -fno-sanitize-merge
74+ common:asanwin --copt -fsanitize-recover=all
75+
76+ # Gives:
77+ # lld-link: error: /alternatename: conflicts: __sanitizer_on_print=__sanitizer_on_print__def
78+ # Use --verbose_failures to see the command lines of failed build steps.
79+ # common:asanwin --copt -fsanitize-stats
80+
81+ # Gives:
82+ # lld-link: error: duplicate symbol: __cfi_check_fail
83+ # >>> defined at runfiles.lib(runfiles.obj)
84+ # common:asanwin --copt -fsanitize-cfi-cross-dso
85+
86+ # Gives multiple, like
87+ # lld-link: error: duplicate symbol: __odr_asan_gen_??_R0?AVios_base@std@@@8
88+ # >>> defined at runfiles.lib(runfiles.obj)
89+ # common:asanwin --copt -fsanitize-address-use-odr-indicator
90+
91+ # https://github.com/llvm/llvm-project/blob/main/compiler-rt/lib/asan/asan_flags.inc
92+ common:asanwin --test_env="ASAN_OPTIONS=report_globals=0:detect_odr_violation=0:verbosity=1:debug=1:strict_init_order=1:check_initialization_order=1:detect_stack_use_after_return=1:print_stats=1:verbosity=2:atexit=1:alloc_dealloc_mismatch=1:strict_string_checks=1:halt_on_error=0:malloc_context_size=0:windows_hook_rtl_allocators=1:print_scariness=1"
93+
94+ # https://github.com/llvm/llvm-project/blob/main/compiler-rt/lib/ubsan/ubsan_flags.inc
95+ common:asanwin --test_env="UBSAN_OPTIONS=print_stacktrace=1:report_error_type=1"
96+ # common:asanwin --test_env="ASAN_OPTIONS=help=1"
6897common:asanwin --cc_output_directory_tag=asanwin
6998common:asanwin --@otel_sdk//:asanwin=true
70-
71- # --config=asan : Address Sanitizer.
99+ test:asanwin --test_timeout=3600
100+ # common:asanwin -fno-sanitize-coverage=<value>
101+ # common:asanwin -fno-sanitize-recover=<value>
102+
72103common:asan --copt -DADDRESS_SANITIZER
73104common:asan --copt -fsanitize=address,bool,float-cast-overflow,integer-divide-by-zero,null,return,returns-nonnull-attribute,shift-exponent,signed-integer-overflow,unreachable,vla-bound
74105common:asan --copt -fsanitize-address-use-after-scope
@@ -170,6 +201,8 @@ build --host_copt="-DGRPC_NO_ABSL_SYNC"
170201# disable all GRPC experiments
171202# build --define=grpc_experiments_are_final=true
172203
204+ common:devenv --run_under='"c:/windows/system32/cmd.exe" /C start "bazel debug exe" /wait devenv /debugexe '
205+
173206## This is what my ../top.bazelrc contains (not in the repo as local to my machine)
174207# build --disk_cache=f:/b/d
175208# common --repository_cache=f:/b/r
0 commit comments