Commit e40ff72
authored
[TSan][test-only] Make TSan os_unfair_lock.c test check the weak symbol before usage (llvm#161173)
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 3f62407 commit e40ff72
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