Commit e871d07
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 c76b244 commit e871d07
1 file changed
Lines changed: 9 additions & 14 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
493 | 493 | | |
494 | 494 | | |
495 | 495 | | |
496 | | - | |
497 | | - | |
498 | | - | |
499 | | - | |
| 496 | + | |
| 497 | + | |
| 498 | + | |
| 499 | + | |
| 500 | + | |
500 | 501 | | |
501 | 502 | | |
502 | 503 | | |
503 | | - | |
504 | | - | |
505 | | - | |
506 | | - | |
507 | | - | |
| 504 | + | |
| 505 | + | |
508 | 506 | | |
| 507 | + | |
| 508 | + | |
509 | 509 | | |
510 | | - | |
511 | | - | |
512 | | - | |
513 | | - | |
514 | | - | |
515 | 510 | | |
516 | 511 | | |
517 | 512 | | |
| |||
0 commit comments