#34270 [NEW]: Segmentation fault in Apache when executing an invalid SQL

From: Date: Fri, 26 Aug 2005 18:02:35 +0000
Subject: #34270 [NEW]: Segmentation fault in Apache when executing an invalid SQL
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-84039@lists.php.net to get a copy of this message
From:             nmariz at estadias dot com
Operating system: Debian GNU/Linux 3.1 (Apache 2)
PHP version:      5.1.0RC1
PHP Bug Type:     PDO related
Bug description:  Segmentation fault in Apache when executing an invalid SQL

Description:
------------
Segmentation fault in Apache when executing an invalid SQL.

apache error.log:

[Fri Aug 26 18:10:42 2005] [notice] child pid 26519 exit signal
Segmentation fault (11)

Actual result:
--------------
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 1079565216 (LWP 28567)]
0x40865cf5 in _efree (ptr=0x83bbf58) at
/root/software/php-5.1.0RC1/Zend/zend_alloc.c:302
302             REMOVE_POINTER_FROM_LIST(p);
(gdb) bt
#0  0x40865cf5 in _efree (ptr=0x83bbf58) at
/root/software/php-5.1.0RC1/Zend/zend_alloc.c:302
#1  0x40727109 in pdo_mysql_stmt_dtor (stmt=0x0, tsrm_ls=0x817ecf8) at
/root/software/php-5.1.0RC1/ext/pdo_mysql/mysql_statement.c:45
#2  0x40724819 in free_statement (stmt=0x83bbe94, tsrm_ls=0x817ecf8) at
/root/software/php-5.1.0RC1/ext/pdo/pdo_stmt.c:1977
#3  0x40896654 in zend_objects_store_del_ref (zobject=0x836b474,
tsrm_ls=0x817ecf8) at
/root/software/php-5.1.0RC1/Zend/zend_objects_API.c:161
#4  0x4087bb74 in _zval_dtor_func (zvalue=0x836b474) at
/root/software/php-5.1.0RC1/Zend/zend_variables.c:52
#5  0x407202d5 in zif_PDO_query (ht=1, return_value=0x836b474,
return_value_ptr=0x0, this_ptr=0x409070eb, return_value_used=0,
    tsrm_ls=0x817ecf8) at zend_variables.h:35
#6  0x408a4446 in zend_do_fcall_common_helper_SPEC
(execute_data=0xbfffbe60, tsrm_ls=0x817ecf8) at zend_vm_execute.h:184
#7  0x408a3b4c in execute (op_array=0x83a550c, tsrm_ls=0x817ecf8) at
zend_vm_execute.h:87
#8  0x408a416b in zend_do_fcall_common_helper_SPEC
(execute_data=0xbfffc060, tsrm_ls=0x817ecf8) at zend_vm_execute.h:219
#9  0x408a3b4c in execute (op_array=0x834c694, tsrm_ls=0x817ecf8) at
zend_vm_execute.h:87
#10 0x408a416b in zend_do_fcall_common_helper_SPEC
(execute_data=0xbfffc2b0, tsrm_ls=0x817ecf8) at zend_vm_execute.h:219
#11 0x408a3b4c in execute (op_array=0x83234f4, tsrm_ls=0x817ecf8) at
zend_vm_execute.h:87
#12 0x408a416b in zend_do_fcall_common_helper_SPEC
(execute_data=0xbfffc640, tsrm_ls=0x817ecf8) at zend_vm_execute.h:219
#13 0x408a3b4c in execute (op_array=0x8352ac4, tsrm_ls=0x817ecf8) at
zend_vm_execute.h:87
#14 0x408a416b in zend_do_fcall_common_helper_SPEC
(execute_data=0xbfffccf0, tsrm_ls=0x817ecf8) at zend_vm_execute.h:219
#15 0x408a3b4c in execute (op_array=0x83283fc, tsrm_ls=0x817ecf8) at
zend_vm_execute.h:87
#16 0x408a416b in zend_do_fcall_common_helper_SPEC
(execute_data=0xbfffcf30, tsrm_ls=0x817ecf8) at zend_vm_execute.h:219
#17 0x408a3b4c in execute (op_array=0x832929c, tsrm_ls=0x817ecf8) at
zend_vm_execute.h:87
#18 0x408a416b in zend_do_fcall_common_helper_SPEC
(execute_data=0xbfffd410, tsrm_ls=0x817ecf8) at zend_vm_execute.h:219
#19 0x408a3b4c in execute (op_array=0x832130c, tsrm_ls=0x817ecf8) at
zend_vm_execute.h:87
#20 0x4087e1fc in zend_execute_scripts (type=8, tsrm_ls=0x817ecf8,
retval=0x0, file_count=3) at /root/software/php-5.1.0RC1/Zend/zend.c:1078
#21 0x4083d534 in php_execute_script (primary_file=0xbffff7a0,
tsrm_ls=0x817ecf8) at /root/software/php-5.1.0RC1/main/main.c:1672
#22 0x408fa0e7 in php_handler (r=0x83133d0) at
/root/software/php-5.1.0RC1/sapi/apache2handler/sapi_apache2.c:562
#23 0x080783a5 in ap_run_handler ()
#24 0x080789b0 in ap_invoke_handler ()
#25 0x08069c9a in ap_process_request ()
#26 0x0806512d in _start ()
#27 0x083133d0 in ?? ()
#28 0x00000004 in ?? ()
#29 0x083133d0 in ?? ()
#30 0x0808373c in ap_run_pre_connection ()
#31 0x080835f5 in ap_run_process_connection ()
#32 0x080769a4 in ap_graceful_stop_signalled ()
#33 0x08076bbb in ap_graceful_stop_signalled ()
#34 0x08076c18 in ap_graceful_stop_signalled ()
#35 0x0807748a in ap_mpm_run ()
#36 0x0807dabd in main ()

-- 
Edit bug report at http://bugs.php.net/?id=34270&edit=1
-- 
Try a CVS snapshot (php4):   http://bugs.php.net/fix.php?id=34270&r=trysnapshot4
Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=34270&r=trysnapshot50
Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=34270&r=trysnapshot51
Fixed in CVS:                http://bugs.php.net/fix.php?id=34270&r=fixedcvs
Fixed in release:            http://bugs.php.net/fix.php?id=34270&r=alreadyfixed
Need backtrace:              http://bugs.php.net/fix.php?id=34270&r=needtrace
Need Reproduce Script:       http://bugs.php.net/fix.php?id=34270&r=needscript
Try newer version:           http://bugs.php.net/fix.php?id=34270&r=oldversion
Not developer issue:         http://bugs.php.net/fix.php?id=34270&r=support
Expected behavior:           http://bugs.php.net/fix.php?id=34270&r=notwrong
Not enough info:             http://bugs.php.net/fix.php?id=34270&r=notenoughinfo
Submitted twice:             http://bugs.php.net/fix.php?id=34270&r=submittedtwice
register_globals:            http://bugs.php.net/fix.php?id=34270&r=globals
PHP 3 support discontinued:  http://bugs.php.net/fix.php?id=34270&r=php3
Daylight Savings:            http://bugs.php.net/fix.php?id=34270&r=dst
IIS Stability:               http://bugs.php.net/fix.php?id=34270&r=isapi
Install GNU Sed:             http://bugs.php.net/fix.php?id=34270&r=gnused
Floating point limitations:  http://bugs.php.net/fix.php?id=34270&r=float
No Zend Extensions:          http://bugs.php.net/fix.php?id=34270&r=nozend
MySQL Configuration Error:   http://bugs.php.net/fix.php?id=34270&r=mysqlcfg


Thread (12 messages)

« previous php.bugs (#84039) next »