Commit Graph

7 Commits

Author SHA1 Message Date
Ben Langmuir
3cdf66ca09 [test] Restrict two driver tests to macOS
These appear to fail when run for other configurations, so restrict them
for now until we can figure out what is going wrong.
2021-09-23 11:52:47 -07:00
Emily Shi
804c3aaea7 Reenable sanitizer tests 2021-05-05 11:15:06 -07:00
Xi Ge
f065cab1bb test: xfail Driver/sanitize_recover.swift
We've seen this test failed in multiple CI jobs. Xfail it while investigating.

rdar://72434165
2020-12-17 14:11:44 -08:00
Dan Liew
cb277316eb Re-enable test/Driver/sanitizer_recover.swift.
rdar://problem/64784401
2020-12-15 16:34:51 -08:00
Xi Ge
568cd85f2c test: xfail Driver/sanitize_recover.swift
rdar://64784401
2020-06-25 18:30:55 -07:00
David Zarzycki
d60b97dcd1 [Testing] Add missing REQUIRES: asan_runtime 2019-11-14 10:33:44 +02:00
Dan Liew
63e72909b5 [Sanitizers] Add Driver/Frontend option to enable sanitizer instrumentation that supports error recovery.
The new option `-sanitize-recover=` takes a list of sanitizers that
recovery instrumentation should be enabled for. Currently we only
support it for Address Sanitizer.

If the option is not specified then the generated instrumentation does
not allow error recovery.

This option mirrors the `-fsanitize-recover=` option of Clang.

We don't enable recoverable instrumentation by default because it may
lead to code size blow up (control flow has to be resumable).

The motivation behind this change is that today, setting
`ASAN_OPTIONS=halt_on_error=0` at runtime doesn't always work. If you
compile without the `-sanitize-recover=address` option (equivalent to
the current behavior of the swift compiler) then the generated
instrumentation doesn't allow for error recovery. What this means is
that if you set `ASAN_OPTIONS=halt_on_error=0` at runtime and if an ASan
issue is caught via instrumentation then the process will always halt
regardless of how `halt_on_error` is set. However, if ASan catches an
issue via one of its interceptors (e.g. memcpy) then `the halt_on_error`
runtime option is respected.

With `-sanitize-recover=address` the generated instrumentation allows
for error recovery which means that the `halt_on_error` runtime option
is also respected when the ASan issue is caught by instrumentation.

ASan's default for `halt_on_error` is true which means this issue only
effects people who choose to not use the default behavior.

rdar://problem/56346688
2019-11-12 11:33:58 -08:00