Bug #71910 [Com]: Too many concatinations in a single statement crashes Apache

From: Date: Tue, 17 Nov 2020 10:14:03 +0000
Subject: Bug #71910 [Com]: Too many concatinations in a single statement crashes Apache
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-230402@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=71910&edit=1 ID: 71910 Comment by: daniel dot neuman at prowledge dot com Reported by: ksours at internebrands dot com Summary: Too many concatinations in a single statement crashes Apache Status: No Feedback Type: Bug Package: Apache2 related Operating System: Windows7 64bit PHP Version: 7.0.4 Block user comment: N Private report: N New Comment: I have the same issue on PHP 7.4.12: A long string concatenation causes a stack overflow in ZEND_COMPILE_BINARY_OP. Increasing the ThreadStackSize mitigates the issue. Would it be possible to anticipate that the thread stack will overflow and have ZEND_COMPILE_BINARY_OP handle it accordingly? Previous Comments: ------------------------------------------------------------------------ [2016-04-17 04:22:52] php-bugs at lists dot php dot net No feedback was provided. The bug is being suspended because we assume that you are no longer experiencing the problem. If this is not the case and you are able to provide the information that was requested earlier, please do so and change the status of the bug back to "Re-Opened". Thank you. ------------------------------------------------------------------------ [2016-04-05 14:32:14] ksours at internetbrands dot com Fair enough. I mainly reported it because it was a regression from PHP5 -- something definitely changed from PHP5 to PHP7 to cause this or to make it worse. (Both my program and the sample script run just fine on PHP5 in the same environment). It would be nice if we could get some kind of graceful error rather than just a crash, but that's not always possible. ------------------------------------------------------------------------ [2016-04-05 06:37:44] ab@php.net Thanks for the check. It is most likely not an issue in PHP. I've two suggestions how to fix it - set TheadStackSize directive as described here https://httpd.apache.org/docs/current/en/mod/mpm_common.html#threadstacksize , or - if you have Visual Studio installed, use the editbin tool to increase the stack size in httpd.exe With the screenshots - yeah, most of them are still compatible, but not all :(. Would you be interested to contribute? If so, a PR can be provided here https://github.com/php/web-bugs/blob/master/www/bugs-generating-backtrace-win32.php Thanks. ------------------------------------------------------------------------ [2016-04-04 22:42:49] ksours at internebrands dot com Also note that the screen shots in your debug doc are out of date. The new tool has a separate analysis app (and you need to set the debug symbols in both) ------------------------------------------------------------------------ [2016-04-04 22:41:16] ksours at internetbrands dot com Note that I've removed a large number of repeated lines because its quite long and I think you get the message. Total line count of the traces is 2508. Entry point libhttpd!ap_run_generate_log_id+3db0 Create time 4/4/2016 6:15:01 PM Time spent in user mode 0 Days 00:00:00.000 Time spent in kernel mode 0 Days 00:00:00.031 This thread is not fully resolved and may or may not be a problem. Further analysis of these threads may be required. php7ts!zend_compile_binary_op+10 php7ts!zend_compile_expr+155 php7ts!zend_compile_binary_op+33 php7ts!zend_compile_expr+155 php7ts!zend_compile_binary_op+33 php7ts!zend_compile_expr+155 php7ts!zend_compile_binary_op+33 php7ts!zend_compile_expr+155 php7ts!zend_compile_binary_op+33 php7ts!zend_compile_expr+155 php7ts!zend_compile_binary_op+33 php7ts!zend_compile_expr+155 php7ts!zend_compile_binary_op+33 php7ts!zend_compile_expr+155 php7ts!zend_compile_binary_op+33 php7ts!zend_compile_expr+155 php7ts!zend_compile_binary_op+33 php7ts!zend_compile_expr+155 php7ts!zend_compile_binary_op+33 php7ts!zend_compile_expr+155 php7ts!zend_compile_binary_op+33 php7ts!zend_compile_expr+155 php7ts!zend_compile_binary_op+33 php7ts!zend_compile_expr+155 ... php7ts!zend_compile_expr+155 php7ts!zend_compile_binary_op+33 php7ts!zend_compile_expr+155 php7ts!zend_compile_binary_op+33 php7ts!zend_compile_expr+155 php7ts!zend_compile_binary_op+33 php7ts!zend_compile_expr+155 php7ts!zend_compile_binary_op+33 php7ts!zend_compile_expr+155 php7ts!zend_compile_binary_op+33 php7ts!zend_compile_expr+155 php7ts!zend_compile_binary_op+33 php7ts!zend_compile_expr+155 php7ts!zend_compile_binary_op+33 php7ts!zend_compile_expr+155 php7ts!zend_compile_binary_op+33 php7ts!zend_compile_expr+155 php7ts!zend_compile_binary_op+33 php7ts!zend_compile_expr+155 php7ts!zend_compile_assign+a5 php7ts!zend_compile_expr+125 php7ts!zend_compile_stmt+162 php7ts!zend_compile_top_stmt+23 php7ts!zend_compile_top_stmt+9c php7ts!compile_file+17e php7ts!phar_compile_file+30c php7ts!zend_execute_scripts+86 php7ts!php_execute_script+4c6 php7apache2_4!php_handler+579 libhttpd!ap_run_handler+35 libhttpd!ap_invoke_handler+110 libhttpd!ap_internal_redirect_handler+29a libhttpd!ap_process_request+17 libhttpd!ap_byterange_filter+152f libhttpd!ap_run_process_connection+35 libhttpd!ap_run_generate_log_id+3f24 kernel32!BaseThreadInitThunk+d ntdll!RtlUserThreadStart+1d Exception Information PHP7TS!ZEND_COMPILE_BINARY_OP+10In httpd__PID__11296__Date__04_04_2016__Time_06_16_39PM__900__Second_Chance_Exception_C00000FD.dmp the assembly instruction at php7ts!zend_compile_binary_op+10 in C:\programming\applications\php704_64\php7ts.dll from The PHP Group has caused a stack overflow exception (0xC00000FD) when trying to write to memory location 0x02643ff8 on thread 3 ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at https://bugs.php.net/bug.php?id=71910 -- Edit this bug report at https://bugs.php.net/bug.php?id=71910&edit=1

« previous php.bugs (#230402) next »