On 19.12.2012 22:27, Stas Malyshev wrote:
https://bugs.php.net/bug.php?id=52752
Just tried to reproduce it on Centos 6.2 install (without APC), works
just fine for me. I suspect it's some APC issue, does it reproduce for
you without APC loaded?
Yes, as I mentioned in previous message and in the comments of that bug.
I'll hilight the relevant backtrace in this message.
Did you tried to run it couple of times? In my tests in one machine
it seemed sometimes run without any problems but then ctrl-c and running
again got the sigbus.
Copy&Paste from bugs.php.net:
5.3.19:
Core was generated by `sapi/cli/php test3.php'.
Program terminated with signal 7, Bus error.
#0 lex_scan (zendlval=<value optimized out>)
at Zend/zend_language_scanner.l:1709
1709 switch (*YYCURSOR++) {
(gdb) list
1704 }
1705
1706
1707 <ST_IN_SCRIPTING>"#"|"//" {
1708 while (YYCURSOR < YYLIMIT) {
1709 switch (*YYCURSOR++) {
1710 case '\r':
1711 if (*YYCURSOR == '\n') {
1712 YYCURSOR++;
1713 }
#0 lex_scan (zendlval=<value optimized out>)
at Zend/zend_language_scanner.l:1709
#1 0x0000000000636640 in zendlex (zendlval=0x7fff2476cb90)
at /root/php-5.3.19/Zend/zend_compile.c:4975
#2 0x0000000000620e66 in zendparse ()
at /root/php-5.3.19/Zend/zend_language_parser.c:3285
#3 0x000000000062bb52 in compile_file (file_handle=0x7fff2476ce80,
type=<value optimized out>) at Zend/zend_language_scanner.l:364
#4 0x00000000005362d1 in phar_compile_file (file_handle=0x7fff2476ce80,
type=2) at /root/php-5.3.19/ext/phar/phar.c:3394
#5 0x000000000062b3de in compile_filename (type=2, filename=0x185ac58)
at Zend/zend_language_scanner.l:407
#6 0x000000000067c63e in ZEND_INCLUDE_OR_EVAL_SPEC_CONST_HANDLER (
execute_data=0x7fe9b5916050)
at /root/php-5.3.19/Zend/zend_vm_execute.h:1967
#7 0x0000000000675a30 in execute (op_array=0x184f358)
at /root/php-5.3.19/Zend/zend_vm_execute.h:107
#8 0x000000000064f86f in zend_execute_scripts (type=8, retval=0x0,
file_count=3) at /root/php-5.3.19/Zend/zend.c:1259
#9 0x00000000005fcd67 in php_execute_script (primary_file=0x7fff24770780)
at /root/php-5.3.19/main/main.c:2316
#10 0x00000000006da002 in main (argc=2, argv=0x7fff24770a18)
at /root/php-5.3.19/sapi/cli/php_cli.c:1189
Test file was also in that bugs comments, which i modified a little
to get it to use version that i did compile.
# cat test3.php
<?php
if ($argv[1] > 0) {
while ($argv[1]--) file_put_contents('test.tpl', "<?php
#".str_repeat('A', mt_rand(4000, 5000))." ?>\n", LOCK_EX);
} else {
$p2 = popen("sapi/cli/php test3.php 100", "r");
while (1) include 'test.tpl';
}
?>
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php