php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #35784 segfault on PDOStatement::execute() with zend.ze1_compatibility_mode = On
Submitted: 2005-12-23 11:30 UTC Modified: 2005-12-24 18:43 UTC
From: crocodile2u at yandex dot ru Assigned: wez (profile)
Status: Closed Package: PDO related
PHP Version: 5CVS-2005-12-23 (snap) OS: linux fedora core 4
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: crocodile2u at yandex dot ru
New email:
PHP Version: OS:

 

 [2005-12-23 11:30 UTC] crocodile2u at yandex dot ru
Description:
------------
see summary

Reproduce code:
---------------
$pdo = & new PDO('mysql:dbname=test;host=localhost', 'root', 'vitek');

$stmt = $pdo->prepare('SHOW TABLES');
$stmt->execute();

var_dump($stmt);

Expected result:
----------------
object(PDOStatement)#2 (1) {
  ["queryString"]=>
  string(11) "SHOW TABLES"
}

Actual result:
--------------
Segmentation fault

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-12-23 11:35 UTC] crocodile2u at yandex dot ru
backtrace
[sorry if I'm casually duplicating this...]
(gdb) bt
#0  pdo_parse_params (stmt=0x8ffacbc, inquery=0x0, inquery_len=33, outquery=0x8ffad08, outquery_len=0x21)
    at /new-ext3/src/php5.1-200512230530/ext/pdo/pdo_sql_parser.c:93
#1  0x08137bbd in zif_PDOStatement_execute (ht=0, return_value=0x9008c84, return_value_ptr=0x0, this_ptr=0x9008c64,
    return_value_used=0) at /new-ext3/src/php5.1-200512230530/ext/pdo/pdo_stmt.c:410
#2  0x08214ecc in zend_do_fcall_common_helper_SPEC (execute_data=0xbfe02e80)
    at /new-ext3/src/php5.1-200512230530/Zend/zend_vm_execute.h:192
#3  0x082146d1 in execute (op_array=0x900431c) at /new-ext3/src/php5.1-200512230530/Zend/zend_vm_execute.h:92
#4  0x081fea5f in zend_execute_scripts (type=8, retval=Variable "retval" is not available.
) at /new-ext3/src/php5.1-200512230530/Zend/zend.c:1101
#5  0x081caefe in php_execute_script (primary_file=0xbfe05274) at /new-ext3/src/php5.1-200512230530/main/main.c:1720
#6  0x082772e0 in main (argc=2, argv=0xbfe05364) at /new-ext3/src/php5.1-200512230530/sapi/cli/php_cli.c:1077
 [2005-12-24 18:43 UTC] iliaa@php.net
Works fine in latest CVS. FYI in PHP 5.1 objects are always being passed by reference so you don't need the & in front of new.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 18 03:01:28 2024 UTC