Skip to content

Commit 8f022bb

Browse files
committed
[ubsan] Halt on error, add supression list
1 parent f341b1c commit 8f022bb

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

Utilities/build-script-helper.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,9 @@ def add_common_args(parser):
8686
if args.sanitize == 'address':
8787
# Workaround reports in Foundation.
8888
env['ASAN_OPTIONS'] = 'detect_leaks=false'
89+
if args.sanitize == 'undefined':
90+
supp = os.path.join(args.package_path, 'Utilities', 'ubsan_supressions.supp')
91+
env['UBSAN_OPTIONS'] = 'halt_on_error=true,suppressions=%s' % supp
8992

9093
if args.action == 'build':
9194
swiftpm('build', swift_exec, swiftpm_args, env)

Utilities/ubsan_supressions.supp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
alignment:mdb.c

0 commit comments

Comments
 (0)