Commit a78b11a
committed
[TSan][test-only] Make TSan os_unfair_lock.c test check the weak symbol before using
The os_unfair_lock.c test can currently fail with a null dereference if compiled on a platform with os_unfair_lock_lock_with_flags, but then executed on a platform without the function.
This patch fixes this by first checking whether the symbol exists, and falls back to os_unfair_lock_lock if not.
rdar://1605965421 parent 3c98be4 commit a78b11a
1 file changed
+6
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
25 | | - | |
26 | | - | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
27 | 31 | | |
28 | 32 | | |
29 | 33 | | |
| |||
0 commit comments