Commit 0ba400b
committed
Read errno before calling rb_io_path()
Possible fix for recent crashes seen on CI.
[BUG] rb_sys_fail_str(<STDIN>) - errno == 0
rb_io_path() calls rb_obj_dup(), which could call initialize_dup in Ruby
and clobber errno before rb_sys_fail_str() gets to read errno. So
save it out first.
(Using separate statements because order of evaluation in function call
list is unspecified, and order is important here.)1 parent 3ffc714 commit 0ba400b
1 file changed
+4
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
125 | 125 | | |
126 | 126 | | |
127 | 127 | | |
128 | | - | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
129 | 132 | | |
130 | 133 | | |
131 | 134 | | |
| |||
0 commit comments