Commit 03bbab2
committed
test_broken_bignum: avoid fork and subprocess for robustness
The raw fork + Process.waitpid2 pattern causes a SEGV on i686-linux in
ruby/ruby CI. The crash occurs in waitpid_blocking_no_SIGCHLD going
through the 32-bit vdso, which is a Ruby VM / kernel interaction issue
unrelated to the json gem itself.
Replace the fork-based approach with an in-process test that temporarily
patches Integer#to_s and restores it via ensure. This avoids the fork
SEGV on i686, works under valgrind (assert_separately doesn't), and
is guarded to only run on CRuby (not JRuby/TruffleRuby) where the
C extension behavior being tested exists.1 parent bfd63d4 commit 03bbab2
1 file changed
+9
-14
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
475 | 475 | | |
476 | 476 | | |
477 | 477 | | |
478 | | - | |
479 | | - | |
480 | | - | |
481 | | - | |
| 478 | + | |
| 479 | + | |
| 480 | + | |
| 481 | + | |
| 482 | + | |
482 | 483 | | |
483 | 484 | | |
484 | 485 | | |
485 | | - | |
486 | | - | |
487 | | - | |
488 | | - | |
489 | | - | |
| 486 | + | |
| 487 | + | |
490 | 488 | | |
| 489 | + | |
| 490 | + | |
491 | 491 | | |
492 | | - | |
493 | | - | |
494 | | - | |
495 | | - | |
496 | | - | |
497 | 492 | | |
498 | 493 | | |
499 | 494 | | |
| |||
0 commit comments