You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This might not be specific to Windows, since I was also able to reproduce it here : https://3v4l.org/qc6TF.
Anyway if you need me to dump more information, just ask (I may not respond immediately).
Huh I had already started debugging this,
anyway the root cause is if (UNEXPECTED(start_type + end_type < 2*IS_STRING)) {
Comment says /* If one of the inputs is NOT a string */ but that's not true as in the example start_type is 5 and end_type is 7, which is 12, and 2*IS_STRING is also 12.
I'd just change it to if (UNEXPECTED(start_type != IS_STRING || end_type != IS_STRING)) { which is clearer and unlikely to be slower in practice. But deferring to Gina.
Activity
iluuu1994 commentedon Jan 8, 2024
Likely caused by the changes from #10826, so assigning to @Girgias.
ndossche commentedon Jan 8, 2024
Huh I had already started debugging this,
anyway the root cause is
if (UNEXPECTED(start_type + end_type < 2*IS_STRING)) {Comment says
/* If one of the inputs is NOT a string */but that's not true as in the example start_type is 5 and end_type is 7, which is 12, and 2*IS_STRING is also 12.I'd just change it to
if (UNEXPECTED(start_type != IS_STRING || end_type != IS_STRING)) {which is clearer and unlikely to be slower in practice. But deferring to Gina.iluuu1994 commentedon Jan 8, 2024
@nielsdos No worries, I doubt Gina will be mad ^^ In any case, it's good she's informed.
Girgias commentedon Jan 8, 2024
Erg I was trying to be smart and failed.
Can you PR the change @nielsdos so that you get proper credit?
Fix phpGH-13094: range(9.9, '0') causes segmentation fault
Merge branch 'PHP-8.3'
Fix phpGH-13094: range(9.9, '0') causes segmentation fault