-
Notifications
You must be signed in to change notification settings - Fork 194
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Regex times out and crashes Apache when pcre.jit is enabled #57
Comments
Thank you for the report. There was a follow-up fix for that: 51ec2c9 |
Thanks for the quick response! Unfortunately I don't have the tools to compile the latest version on Windows, so I'll wait a few days for the new PHP release, which most likely has PCRE 10.39 bundled :) |
@zherczeg, PHP already has that patch applied (php/php-src@788a701), but the stack overflow occurs nonetheless. I'll try with a clean PCRE2 10.39, and report back. @JackJohansson, it is rather unlikely that PHP 8.1.0 will ship with PCRE2 10.39. It is still on a slightly patched 10.37, and 8.1.0 is going to be tagged today. |
Same issue, namely a stack overflow during compilation. |
Hm, it looks like when I updated the code I changed a |
Please check if #58 fixes the issue. I am doing too many typos these days. |
Yes, that fixes the issue (and the rest of PHP's pcre test suite still passes). Thank you! |
@PhilipHazel if you are ok with this patch, please land it. Thank you. |
I have done the merge of #58. |
Recently I've installed PHP8.1.0RC6 and Laravel 9 to try out some of the new features. I was unable to load any pages using Laravel, as Apache would crash and I would get a connection reset message.
I've posted a bug report on Laravel's repository here. We've tracked down the issue to a regex. I was suggested to post the bug on php.net, which I did submit. After further investigation, it appears that the issue is related to a recent patch to this repository.
The detailed bug description can be found in the links below, but just as a short explanation, the following piece of code will crash Apache ( using 2.4.51 ) when
pcre.jit = 1
but does not cause a problem when it's executed via CLI:Bug report on Laravel repository:
laravel/framework#39716
Bug report on bugs.php.net:
https://bugs.php.net/bug.php?id=81647
The text was updated successfully, but these errors were encountered: