I am trying to build TF with ASAN flag enabled , using the command :
bazel build --config=dbg --config=asan --copt -fsanitize=address --linkopt -fsanitize=address //tensorflow/tools/pip_package:build_pip_package --verbose_failures

but this would give me an error about the third party library:
ERROR: /home/user/.cache/bazel/_bazel_user/7562dd0a46bcb6cada6ae19650738275/external/libjpeg_turbo/BUILD.bazel:238:8: Executing genrule @libjpeg_turbo//:simd_x86_64_assemblage23 failed (Exit 1): bash failed: error executing command
  (cd /home/user/.cache/bazel/_bazel_user/7562dd0a46bcb6cada6ae19650738275/execroot/org_tensorflow && \
  exec env - \
    LD_LIBRARY_PATH=/usr/local/cuda-11.3/lib64 \
    PATH=/home/user/bin:/usr/local/cuda-11.3/bin:/home/user/anaconda3/envs/tfenv/bin:/home/user/anaconda3/condabin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin \
  /bin/bash -c 'source external/bazel_tools/tools/genrule/genrule-setup.sh; for out in bazel-out/k8-opt-exec-50AE0418/bin/external/libjpeg_turbo/simd/x86_64/jccolor-avx2.o bazel-out/k8-opt-exec-50AE0418/bin/external/libjpeg_turbo/simd/x86_64/jccolor-sse2.o bazel-out/k8-opt-exec-50AE0418/bin/external/libjpeg_turbo/simd/x86_64/jcgray-avx2.o bazel-out/k8-opt-exec-50AE0418/bin/external/libjpeg_turbo/simd/x86_64/jcgray-sse2.o bazel-out/k8-opt-exec-50AE0418/bin/external/libjpeg_turbo/simd/x86_64/jchuff-sse2.o bazel-out/k8-opt-exec-50AE0418/bin/external/libjpeg_turbo/simd/x86_64/jcphuff-sse2.o bazel-out/k8-opt-exec-50AE0418/bin/external/libjpeg_turbo/simd/x86_64/jcsample-avx2.o bazel-out/k8-opt-exec-50AE0418/bin/external/libjpeg_turbo/simd/x86_64/jcsample-sse2.o bazel-out/k8-opt-exec-50AE0418/bin/external/libjpeg_turbo/simd/x86_64/jdcolor-avx2.o bazel-out/k8-opt-exec-50AE0418/bin/external/libjpeg_turbo/simd/x86_64/jdcolor-sse2.o bazel-out/k8-opt-exec-50AE0418/bin/external/libjpeg_turbo/simd/x86_64/jdmerge-avx2.o bazel-out/k8-opt-exec-50AE0418/bin/external/libjpeg_turbo/simd/x86_64/jdmerge-sse2.o bazel-out/k8-opt-exec-50AE0418/bin/external/libjpeg_turbo/simd/x86_64/jdsample-avx2.o bazel-out/k8-opt-exec-50AE0418/bin/external/libjpeg_turbo/simd/x86_64/jdsample-sse2.o bazel-out/k8-opt-exec-50AE0418/bin/external/libjpeg_turbo/simd/x86_64/jfdctflt-sse.o bazel-out/k8-opt-exec-50AE0418/bin/external/libjpeg_turbo/simd/x86_64/jfdctfst-sse2.o bazel-out/k8-opt-exec-50AE0418/bin/external/libjpeg_turbo/simd/x86_64/jfdctint-avx2.o bazel-out/k8-opt-exec-50AE0418/bin/external/libjpeg_turbo/simd/x86_64/jfdctint-sse2.o bazel-out/k8-opt-exec-50AE0418/bin/external/libjpeg_turbo/simd/x86_64/jidctflt-sse2.o bazel-out/k8-opt-exec-50AE0418/bin/external/libjpeg_turbo/simd/x86_64/jidctfst-sse2.o bazel-out/k8-opt-exec-50AE0418/bin/external/libjpeg_turbo/simd/x86_64/jidctint-avx2.o bazel-out/k8-opt-exec-50AE0418/bin/external/libjpeg_turbo/simd/x86_64/jidctint-sse2.o bazel-out/k8-opt-exec-50AE0418/bin/external/libjpeg_turbo/simd/x86_64/jidctred-sse2.o bazel-out/k8-opt-exec-50AE0418/bin/external/libjpeg_turbo/simd/x86_64/jquantf-sse2.o bazel-out/k8-opt-exec-50AE0418/bin/external/libjpeg_turbo/simd/x86_64/jquanti-avx2.o bazel-out/k8-opt-exec-50AE0418/bin/external/libjpeg_turbo/simd/x86_64/jquanti-sse2.o bazel-out/k8-opt-exec-50AE0418/bin/external/libjpeg_turbo/simd/x86_64/jsimdcpu.o; do
  bazel-out/k8-dbg/bin/external/nasm/nasm -f elf64    -DELF -DPIC -D__x86_64__    -I $(dirname bazel-out/k8-opt-exec-50AE0418/bin/external/libjpeg_turbo/jconfig.h)/    -I $(dirname bazel-out/k8-opt-exec-50AE0418/bin/external/libjpeg_turbo/jconfigint.h)/    -I $(dirname external/libjpeg_turbo/simd/nasm/jsimdcfg.inc.h)/    -I $(dirname external/libjpeg_turbo/simd/x86_64/jccolext-sse2.asm)/    -o $out    $(dirname external/libjpeg_turbo/simd/x86_64/jccolext-sse2.asm)/$(basename ${out%.o}.asm)
done')
Execution platform: @local_execution_config_platform//:platform

=================================================================
==479927==ERROR: LeakSanitizer: detected memory leaks

Direct leak of 5888 byte(s) in 32 object(s) allocated from:
    #0 0x7f0adb6bcbc8 in malloc (/lib/x86_64-linux-gnu/libasan.so.5+0x10dbc8)
    #1 0x55d56e9d76d1 in nasm_malloc (/home/user/.cache/bazel/_bazel_user/7562dd0a46bcb6cada6ae19650738275/execroot/org_tensorflow/bazel-out/k8-dbg/bin/external/nasm/nasm+0x1d96d1)
    #2 0x55d56e9b9c2e in do_directive (/home/user/.cache/bazel/_bazel_user/7562dd0a46bcb6cada6ae19650738275/execroot/org_tensorflow/bazel-out/k8-dbg/bin/external/nasm/nasm+0x1bbc2e)
    #3 0x55d56e9c5d60 in pp_getline (/home/user/.cache/bazel/_bazel_user/7562dd0a46bcb6cada6ae19650738275/execroot/org_tensorflow/bazel-out/k8-dbg/bin/external/nasm/nasm+0x1c7d60)
    #4 0x55d56e99d13f in assemble_file.constprop.8 (/home/user/.cache/bazel/_bazel_user/7562dd0a46bcb6cada6ae19650738275/execroot/org_tensorflow/bazel-out/k8-dbg/bin/external/nasm/nasm+0x19f13f)
    #5 0x55d56e97b275 in main (/home/user/.cache/bazel/_bazel_user/7562dd0a46bcb6cada6ae19650738275/execroot/org_tensorflow/bazel-out/k8-dbg/bin/external/nasm/nasm+0x17d275)
    #6 0x7f0adb2020b2 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x270b2)

Direct leak of 768 byte(s) in 192 object(s) allocated from:
    #0 0x7f0adb6bcbc8 in malloc (/lib/x86_64-linux-gnu/libasan.so.5+0x10dbc8)
    #1 0x55d56e9d76d1 in nasm_malloc (/home/user/.cache/bazel/_bazel_user/7562dd0a46bcb6cada6ae19650738275/execroot/org_tensorflow/bazel-out/k8-dbg/bin/external/nasm/nasm+0x1d96d1)
    #2 0x55d56e9ac010 in new_Token.constprop.9 (/home/user/.cache/bazel/_bazel_user/7562dd0a46bcb6cada6ae19650738275/execroot/org_tensorflow/bazel-out/k8-dbg/bin/external/nasm/nasm+0x1ae010)
    #3 0x55d56e9c706d in pp_getline (/home/user/.cache/bazel/_bazel_user/7562dd0a46bcb6cada6ae19650738275/execroot/org_tensorflow/bazel-out/k8-dbg/bin/external/nasm/nasm+0x1c906d)
    #4 0x55d56e99d13f in assemble_file.constprop.8 (/home/user/.cache/bazel/_bazel_user/7562dd0a46bcb6cada6ae19650738275/execroot/org_tensorflow/bazel-out/k8-dbg/bin/external/nasm/nasm+0x19f13f)
    #5 0x55d56e97b275 in main (/home/user/.cache/bazel/_bazel_user/7562dd0a46bcb6cada6ae19650738275/execroot/org_tensorflow/bazel-out/k8-dbg/bin/external/nasm/nasm+0x17d275)
    #6 0x7f0adb2020b2 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x270b2)

So I tried to add the following to the  third_party/jpec/BUILD.bazel :
# line 238
genrule(
    name = "simd_x86_64_assemblage23",
+    tags = [
+       "noasan",
+        "no_cuda_asan",
+       "nomsan",
+        "notsan",
+    ],

This still does not help.
Is there tips of how to deal with this?