Skip to content

Commit e1654ab

Browse files
committed
Disable UBSAN on macOS
Building indexstore-db with ubsan enabled with an Xcode 15.1 SDK causes C++ exception to not be catchable with `try {} catch {}` blocks and indexstore-db relies on exception catching, possibly related to https://stackoverflow.com/questions/51673343/clang-with-libc-exceptions. Disable UBSAN for now and re-enable it when CI nodes has been updated to Xcode 16.
1 parent fbbde36 commit e1654ab

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

Utilities/build-script-helper.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,13 @@ def main() -> None:
230230
handle_invocation(swift_exec, args)
231231

232232
# Linux ubsan disabled: https://bugs.swift.org/browse/SR-12550
233-
if platform.system() != 'Linux':
233+
#
234+
# ubsan disabled on macOS because building indexstore-db using a new, just-built clang with ubsan enabled but
235+
# with an Xcode 15.1 SDK causes C++ exception to not be catchable with `try {} catch {}` blocks and
236+
# indexstore-db relies on exception catching, possibly related to
237+
# https://stackoverflow.com/questions/51673343/clang-with-libc-exceptions.
238+
# Re-enable when Xcode on CI nodes has been updated to Xcode 16 (rdar://139647872)
239+
if platform.system() != 'Linux' and False:
234240
print('=== %s indexstore-db with ubsan ===' % args.action)
235241
args.sanitize = ['undefined']
236242
args.build_path = os.path.join(base, 'test-ubsan')

0 commit comments

Comments
 (0)