php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #35797 segfault on PDOStatement::execute() with zend.ze1_compatibility_mode = On
Submitted: 2005-12-24 19:40 UTC Modified: 2006-01-01 21:08 UTC
From: judas dot iscariote at gmail dot com Assigned: wez
Status: Closed Package: PDO related
PHP Version: 5CVS-2005-12-24 (CVS) OS: *
Private report: No CVE-ID:
 [2005-12-24 19:40 UTC] judas dot iscariote at gmail dot com
Description:
------------
bug #35784 is still present..

Reproduce code:
---------------
same as bug #35784

Expected result:
----------------
no segfault

Actual result:
--------------
gdb) run -d zend.ze1_compatibility_mode=On pdo.php
Starting program: /usr/bin/php -d zend.ze1_compatibility_mode=On pdo.php
[Thread debugging using libthread_db enabled]
[New Thread 46912513283232 (LWP 10176)]

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 46912513283232 (LWP 10176)]
zend_objects_store_del_ref (zobject=0x91fc50) at /usr/src/debug/php-5.1.2/Zend/zend_objects_API.c:156
156             if (EG(objects_store).object_buckets[handle].valid) {
(gdb) bt
#0  zend_objects_store_del_ref (zobject=0x91fc50) at /usr/src/debug/php-5.1.2/Zend/zend_objects_API.c:156
#1  0x00002aaaae9d3a28 in zif_PDO_prepare (ht=1, return_value=0x920aa8, return_value_ptr=<value optimized out>,
    this_ptr=0x91fbe8, return_value_used=<value optimized out>) at /usr/src/debug/php-5.1.2/ext/pdo/pdo_dbh.c:502
#2  0x000000000054f605 in zend_do_fcall_common_helper_SPEC (execute_data=0x7ffffff9c480) at zend_vm_execute.h:192
#3  0x000000000054ecf3 in execute (op_array=0x920778) at zend_vm_execute.h:92
#4  0x0000000000532a7c in zend_execute_scripts (type=8, retval=<value optimized out>, file_count=3)
    at /usr/src/debug/php-5.1.2/Zend/zend.c:1101
#5  0x00000000004f599a in php_execute_script (primary_file=0x7ffffff9eb40) at /usr/src/debug/php-5.1.2/main/main.c:1720
#6  0x00000000005c30d5 in main (argc=4, argv=0x7ffffff9ecf8) at /usr/src/debug/php-5.1.2/sapi/cli/php_cli.c:1077

php -v 
PHP 5.1.2RC2-dev (cli) (built: Dec 24 2005 15:27:22)

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-12-25 17:36 UTC] sniper@php.net
Ilia, you claimed this was fixed..
 [2005-12-25 20:47 UTC] iliaa@php.net
seems to be another ze1 emulation problem, as it works fine normally.
 [2005-12-26 09:46 UTC] dmitry@php.net
PDO doesn't support object cloning. It uses default zend_objects_clone_obj() handler that doesn't copy PDO related data structures. As a result we have crash.
 [2005-12-27 21:42 UTC] judas dot iscariote at gmail dot com
so.. extensions like PDO that doesn't support object cloning
can disable zend.ze1_compatibility_mode if detected or throw and E_ERROR or something right ???

I don't use zend.ze1_compatibility_mode.. but I think this kind of issues can be very confusing for people using it.
 [2005-12-30 15:14 UTC] tony2001@php.net
Wez, check the patch plz:
http://tony2001.phpclub.net/dev/tmp/bug35784.diff
 [2006-01-01 21:08 UTC] iliaa@php.net
This bug has been fixed in CVS.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
 
Thank you for the report, and for helping us make PHP better.


 
PHP Copyright © 2001-2014 The PHP Group
All rights reserved.
Last updated: Sun Apr 20 03:02:42 2014 UTC