[compiler-rt] ebd8eee - [Darwin] Apply workaround to make symbolication in iOS simulators work
Julian Lettner via llvm-commits
llvm-commits at lists.llvm.org
Fri Jan 7 16:49:18 PST 2022
Author: Julian Lettner
Date: 2022-01-07T16:49:12-08:00
New Revision: ebd8eee62a431a6744c3f187fcda58e5dea08499
URL: https://github.com/llvm/llvm-project/commit/ebd8eee62a431a6744c3f187fcda58e5dea08499
DIFF: https://github.com/llvm/llvm-project/commit/ebd8eee62a431a6744c3f187fcda58e5dea08499.diff
LOG: [Darwin] Apply workaround to make symbolication in iOS simulators work
Specify `ASAN_SYMBOLIZER_PATH` when running simulator tests. This will
unblock simulator testing in GreenDragon (Apple's open source testing).
Added:
Modified:
compiler-rt/test/sanitizer_common/ios_commands/iossim_run.py
Removed:
################################################################################
diff --git a/compiler-rt/test/sanitizer_common/ios_commands/iossim_run.py b/compiler-rt/test/sanitizer_common/ios_commands/iossim_run.py
index c8ff980c8b616..49df74e862b6c 100755
--- a/compiler-rt/test/sanitizer_common/ios_commands/iossim_run.py
+++ b/compiler-rt/test/sanitizer_common/ios_commands/iossim_run.py
@@ -14,6 +14,7 @@
"ASAN_OPTIONS",
"TSAN_OPTIONS",
"UBSAN_OPTIONS",
+ "LSAN_OPTIONS",
"APPLE_ASAN_INIT_FOR_DLOPEN",
"ASAN_ACTIVATION_OPTIONS",
"MallocNanoZone",
@@ -21,6 +22,11 @@
if e in os.environ:
os.environ["SIMCTL_CHILD_" + e] = os.environ[e]
+find_atos_cmd = 'xcrun -sdk iphonesimulator -f atos'
+atos_path = subprocess.run(find_atos_cmd.split(), capture_output=True, check=True).stdout.decode().strip()
+for san in ['ASAN', 'TSAN', 'UBSAN', 'LSAN']:
+ os.environ[f'SIMCTL_CHILD_{san}_SYMBOLIZER_PATH'] = atos_path
+
prog = sys.argv[1]
exit_code = None
if prog == 'rm':
@@ -39,7 +45,7 @@
# We use `shell=True` so that any wildcard globs get expanded by the shell.
if iossim_run_verbose:
- print("RUNNING: \t{}".format(rm_cmd_line_str))
+ print("RUNNING: \t{}".format(rm_cmd_line_str), flush=True)
exitcode = subprocess.call(rm_cmd_line_str, shell=True)
@@ -53,7 +59,7 @@
cmd += sys.argv[1:]
if iossim_run_verbose:
- print("RUNNING: \t{}".format(" ".join(cmd)))
+ print("RUNNING: \t{}".format(" ".join(cmd)), flush=True)
exitcode = subprocess.call(cmd)
if exitcode > 125:
More information about the llvm-commits
mailing list