Commit b5e044a
authored
Disable sigaltstack overriding in asan builds (#10024)
This commit is an attempt to fix a number of flaky crashes that we've
been seeing on OSS-Fuzz for some time now. These crashes only reproduce
under ASAN and even then have been spotty to reproduce. The current
thinking is that a test with threads (e.g. only `wast_tests` using some
of the threads spec tests) is required to run some wasm which will
register a `sigaltstack`. Destruction of this `sigaltstack` happens
with TLS destructors which seems to have a bad interaction with ASAN
state additionally being destroyed around that time.
This whole interaction means that no one test case is enough to
reproduce the corruption. Many crashes on OSS-Fuzz are likely due to
"some historical test case spawned a thread" which corrupted something
to crash later. The test case that I can reproduce with locally requires
rerunning it in the same process a few thousand times to get a
reproduction.
The purpose of the `sigaltstack` is to ensure that we have a big enough
stack, primarily in debug mode, for testing if a trap is wasm. The hope
is that this extra size of the Rust-standard-library-default's stack
size is not necessary in release mode with ASAN. In the end time will
tell with OSS-Fuzz to see if we can keep this or if we need to both
install a bigger sigaltstack in addition to managing them differently in
ASAN builds.1 parent 66d5ad3 commit b5e044a
1 file changed
+53
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
393 | 393 | | |
394 | 394 | | |
395 | 395 | | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
396 | 414 | | |
397 | 415 | | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
| 426 | + | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
| 431 | + | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
| 438 | + | |
| 439 | + | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
| 443 | + | |
| 444 | + | |
| 445 | + | |
| 446 | + | |
| 447 | + | |
| 448 | + | |
| 449 | + | |
| 450 | + | |
398 | 451 | | |
399 | 452 | | |
400 | 453 | | |
| |||
0 commit comments