Skip to content

Commit 9785749

Browse files
committed
Disable user poisoning in swift LLDB
1 parent 6867afc commit 9785749

File tree

3 files changed

+16
-0
lines changed

3 files changed

+16
-0
lines changed

lldb/test/API/lit.cfg.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,11 @@ def delete_module_cache(path):
135135
config.environment[
136136
"ASAN_OPTIONS"
137137
] = "detect_container_overflow=0:detect_stack_use_after_return=1"
138+
# FIXME: This is the wrong place to disable this. This is working
139+
# around the fact that the ci.swift.org scripts build only LLDB with
140+
# asan and this creates an ODR violation in Allocator.h that breaks
141+
# poisoning.
142+
config.environment['ASAN_OPTIONS'] += ':' + 'allow_user_poisoning=0'
138143
# End Swift mod.
139144
if "Darwin" in config.host_os:
140145
config.environment["DYLD_INSERT_LIBRARIES"] = find_sanitizer_runtime(

lldb/test/Shell/lit.cfg.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,11 @@
5858
config.environment[
5959
"ASAN_OPTIONS"
6060
] = "detect_container_overflow=0:detect_stack_use_after_return=1"
61+
# FIXME: This is the wrong place to disable this. This is working
62+
# around the fact that the ci.swift.org scripts build only LLDB with
63+
# asan and this creates an ODR violation in Allocator.h that breaks
64+
# poisoning.
65+
config.environment['ASAN_OPTIONS'] += ':' + 'allow_user_poisoning=0'
6166
# End Swift mod.
6267
if platform.system() == "Darwin":
6368
config.environment["MallocNanoZone"] = "0"

lldb/test/Unit/lit.cfg.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,12 @@
4343
# false positive in std::vector. We also want to support testing a sanitized
4444
# lldb using unsanitized llvm, clang, and swift libraries.
4545
config.environment['ASAN_OPTIONS'] += ':' + 'detect_container_overflow=0'
46+
47+
# FIXME: This is the wrong place to disable this. This is working
48+
# around the fact that the ci.swift.org scripts build only LLDB with
49+
# asan and this creates an ODR violation in Allocator.h that breaks
50+
# poisoning.
51+
config.environment['ASAN_OPTIONS'] += ':' + 'allow_user_poisoning=0'
4652
# End Swift mod.
4753

4854

0 commit comments

Comments
 (0)