Symbolize ASan traces when using run_tests.py (flutter/engine#28274)
* Configure ASan to symbolize on linux * Supply ASAN_SYMBOLIZER_PATH when running tests, fix problem with line stripping in run_tests
This commit is contained in:
@@ -569,7 +569,7 @@ def main():
|
||||
]
|
||||
process = subprocess.Popen(command, stdout=subprocess.PIPE)
|
||||
for line in process.stdout:
|
||||
key, _, value = str(line).partition("=")
|
||||
key, _, value = line.decode('ascii').strip().partition("=")
|
||||
os.environ[key] = value
|
||||
process.communicate() # Avoid pipe deadlock while waiting for termination.
|
||||
|
||||
|
||||
@@ -1,4 +1,14 @@
|
||||
TESTING_DIRECTORY=$(dirname "${BASH_SOURCE[0]}")
|
||||
TESTING_DIRECTORY=$(cd $(dirname "${BASH_SOURCE[0]}"); pwd -P)
|
||||
ENGINE_BUILDROOT=$(cd $TESTING_DIRECTORY/../..; pwd -P)
|
||||
|
||||
case "$(uname -s)" in
|
||||
Linux)
|
||||
BUILDTOOLS_DIRECTORY="${ENGINE_BUILDROOT}/buildtools/linux-x64"
|
||||
;;
|
||||
Darwin)
|
||||
BUILDTOOLS_DIRECTORY="${ENGINE_BUILDROOT}/buildtools/mac-x64"
|
||||
;;
|
||||
esac
|
||||
|
||||
TSAN_SUPPRESSIONS_FILE="${TESTING_DIRECTORY}/tsan_suppressions.txt"
|
||||
export TSAN_OPTIONS="suppressions=${TSAN_SUPPRESSIONS_FILE}"
|
||||
@@ -13,4 +23,5 @@ export UBSAN_OPTIONS="suppressions=${UBSAN_SUPPRESSIONS_FILE}"
|
||||
echo "Using Undefined Behavior suppressions in ${UBSAN_SUPPRESSIONS_FILE}"
|
||||
|
||||
|
||||
export ASAN_OPTIONS="detect_leaks=0:detect_container_overflow=0"
|
||||
export ASAN_OPTIONS="symbolize=1:detect_leaks=0:detect_container_overflow=0"
|
||||
export ASAN_SYMBOLIZER_PATH="${BUILDTOOLS_DIRECTORY}/clang/bin/llvm-symbolizer"
|
||||
|
||||
Reference in New Issue
Block a user