Edit report at https://bugs.php.net/bug.php?id=63923&edit=1
ID: 63923
User updated by: remi at minimal-beton dot com
Reported by: remi at minimal-beton dot com
Summary: filter_var( $mail, FILTER_VALIDATE_EMAIL) crash
Apache if $mail longer than 155
Status: Open
Type: Bug
Package: Reproducible crash
Operating System: Windows 7
PHP Version: 5.3.20
Block user comment: N
Private report: N
New Comment:
Haaaaaaaaaaaaaaaaaaaaaaaaaaaa :)
I'm starting to understand :)
Thanks.
Previous Comments:
------------------------------------------------------------------------
[2013-01-07 20:11:52] [email protected]
it is the PCRE regex to parse the email, it needs recursion. It may not use the
16MB but most of apache builds out there use a way too small stack size on
windows. Much smaller than on Linux.
------------------------------------------------------------------------
[2013-01-07 20:08:03] remi at minimal-beton dot com
16 Mo to manage a 160 length string...
I'm not enough good to understand :(
------------------------------------------------------------------------
[2013-01-07 19:17:06] [email protected]
After
editbin /stack:16777216 httpd.exe
I get bool(false) while running under apache. Previously crash with the default
value. Seems like it can be solved with just increasing the stack size
------------------------------------------------------------------------
[2013-01-07 18:38:34] [email protected]
Can you try in CLI please? While you did not provide a backtrace, I am pretty
sure
it is related to PCRE stack limit issue.
------------------------------------------------------------------------
[2013-01-06 20:09:30] remi at minimal-beton dot com
Description:
------------
WHEN USING
filter_var( $mail, FILTER_VALIDATE_EMAIL)
It EVERY TIME crashes Apache
IF $mail is longer than 155 characters
-----------------------------------------
[Mon Dec 10 14:08:34 2012] [notice] Parent: Received shutdown signal --
Shutting
down the server.
[Mon Dec 10 14:08:34 2012] [notice] Child 4212: Exit event signaled. Child
process is ending.
[Mon Dec 10 14:08:35 2012] [notice] Child 4212: Released the start mutex
[Mon Dec 10 14:08:36 2012] [notice] Child 4212: All worker threads have exited.
[Mon Dec 10 14:08:36 2012] [notice] Child 4212: Child process is exiting
[Mon Dec 10 14:08:36 2012] [notice] Parent: Child process exited successfully.
[Mon Dec 10 14:08:36 2012] [notice] Apache/2.2.22 (Win64) PHP/5.3.13 configured
-- resuming normal operations
[Mon Dec 10 14:08:36 2012] [notice] Server built: May 13 2012 19:41:17
[Mon Dec 10 14:08:36 2012] [notice] Parent: Created child process 2096
[Mon Dec 10 14:08:36 2012] [notice] Child 2096: Child process is running
[Mon Dec 10 14:08:36 2012] [notice] Child 2096: Acquired the start mutex.
[Mon Dec 10 14:08:36 2012] [notice] Child 2096: Starting 64 worker threads.
[Mon Dec 10 14:08:36 2012] [notice] Child 2096: Starting thread to listen on
port 80.
[Mon Dec 10 14:08:36 2012] [notice] Child 2096: Starting thread to listen on
port 80.
Test script:
---------------
filter_var(
"maiuuuuooumaidtotypo3mailtotypo3iiiiimailtotypo3mailtotypo3mailtotypo3mailtosssssmailtotypo3ppppppppppmailtotypo3mailtopdsdmarcheddefensedbrando...@iiii.fr",
FILTER_VALIDATE_EMAIL));
Expected result:
----------------
function must return FALSE or TRUE
Actual result:
--------------
It EVERY TIME crashes Apache
-----------------------------------------
[Mon Dec 10 14:08:34 2012] [notice] Parent: Received shutdown signal --
Shutting
down the server.
[Mon Dec 10 14:08:34 2012] [notice] Child 4212: Exit event signaled. Child
process is ending.
[Mon Dec 10 14:08:35 2012] [notice] Child 4212: Released the start mutex
[Mon Dec 10 14:08:36 2012] [notice] Child 4212: All worker threads have exited.
[Mon Dec 10 14:08:36 2012] [notice] Child 4212: Child process is exiting
[Mon Dec 10 14:08:36 2012] [notice] Parent: Child process exited successfully.
[Mon Dec 10 14:08:36 2012] [notice] Apache/2.2.22 (Win64) PHP/5.3.13 configured
-- resuming normal operations
[Mon Dec 10 14:08:36 2012] [notice] Server built: May 13 2012 19:41:17
[Mon Dec 10 14:08:36 2012] [notice] Parent: Created child process 2096
[Mon Dec 10 14:08:36 2012] [notice] Child 2096: Child process is running
[Mon Dec 10 14:08:36 2012] [notice] Child 2096: Acquired the start mutex.
[Mon Dec 10 14:08:36 2012] [notice] Child 2096: Starting 64 worker threads.
[Mon Dec 10 14:08:36 2012] [notice] Child 2096: Starting thread to listen on
port 80.
[Mon Dec 10 14:08:36 2012] [notice] Child 2096: Starting thread to listen on
port 80.
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=63923&edit=1