It's not completely clear to me why this needs to be explicitly specified in some environments, and not in others, while at the same time that llvm-symbolizer is already in PATH, but this has fixed the 2 issues outlined in #28147.
Use LLVM_SYMBOLIZER_PATH as the env var, as that is somewhat also used inside LLVM, but not consistently, i.e it's checked for in the asan_symbolize script, but not in in the ubsan_symbolize script, or from in compiler-rt.
Alternative to #28804.