php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #10496 segfault on parse error
Submitted: 2001-04-25 15:44 UTC Modified: 2001-05-11 20:43 UTC
From: teo at gecadsoftware dot com Assigned:
Status: Closed Package: Scripting Engine problem
PHP Version: 4.0.4pl1 OS: SuSE7.0
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: teo at gecadsoftware dot com
New email:
PHP Version: OS:

 

 [2001-04-25 15:44 UTC] teo at gecadsoftware dot com
Given the complexity of the whole app, I couldn't make a small script. 
The offending code was:
$tplBoxes = array ();
<?php foreach ($tplBoxes as $box) {
<option value="<?=$box['idb']?>"><?=$box['title']?></option>
 <?php } ?>

[note the missing ?> after foreach]

And the logs were:
Wed Apr 25 22:01:12 2001] [error] PHP Parse error:  parse error in /usr/local/cvsdevel/php/aol/htdocs/Admin/editTemplat
/usr/local/cvsdevel/php/aol/htdocs/Admin/editTemplates.php(40) : Parse error - parse error
[Wed Apr 25 22:01:12 2001] [notice] child pid 7245 exit signal Segmentation fault (11)

line 40 is exactly the line with the missing ?>

The backtrace is:
Program received signal SIGSEGV, Segmentation fault.
0x40185cc8 in _zval_ptr_dtor () at zend_execute_API.c:103
103     }
(gdb) bt
#0  0x40185cc8 in _zval_ptr_dtor () at zend_execute_API.c:103
#1  0x40184792 in zend_switch_free (opline=0x824b94c, Ts=0xbfffd074) at ./zend_execute.c:236
#2  0x401811c1 in execute () at ./zend_execute.c:877
#3  0x40181e85 in execute () at ./zend_execute.c:877
#4  0x40181e85 in execute () at ./zend_execute.c:877
#5  0x40191880 in zend_execute_scripts () at zend.c:259
#6  0x401a99b3 in php_execute_script () at main.c:1153
#7  0x401a503e in apache_php_module_main () at sapi_apache.c:98
#8  0x401a5d69 in send_php () at mod_php4.c:433
#9  0x401a5db3 in send_parsed_php () at mod_php4.c:433
#10 0x8076669 in ap_invoke_handler ()
#11 0x808c05f in process_request_internal ()
#12 0x808c0d2 in ap_process_request ()
#13 0x8082c76 in child_main ()
#14 0x8082e55 in make_child ()
#15 0x8082fd6 in startup_children ()
#16 0x808365c in standalone_main ()
#17 0x8083eac in main ()
#18 0x40083a8e in __libc_start_main () at ../sysdeps/generic/libc-start.c:93
(gdb) 

hope it helps

ciao 

--teodor

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-04-28 15:49 UTC] jmoore@php.net
cant reproduce but looks like a dup of 8663
 [2001-05-11 20:43 UTC] sniper@php.net
Should be fixed in CVS.

--Jani

 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Wed May 07 09:01:27 2025 UTC