php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #44685 SIGSEGV in _zend_is_inconsistent
Submitted: 2008-04-10 22:36 UTC Modified: 2008-04-20 01:00 UTC
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:0 of 0 (0.0%)
From: andrea dot granata at starnetsrl dot it Assigned:
Status: No Feedback Package: Reproducible crash
PHP Version: 5.2.5 OS: freebsd
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: andrea dot granata at starnetsrl dot it
New email:
PHP Version: OS:

 

 [2008-04-10 22:36 UTC] andrea dot granata at starnetsrl dot it
Description:
------------
Same bug on freebsd 7.0 and ubuntu 7.10 with php 5.2.3.
tested with php-cli and mod_php.


Reproduce code:
---------------
<?php
//tested with Zend Framework 1.5.1

set_include_path('../library' . PATH_SEPARATOR . get_include_path());

require_once 'Zend/Db.php';

$db = Zend_Db::factory('Pdo_Pgsql', array(
    'host'     => '127.0.0.1',
    'username' => 'postgres',
    'password' => '*****',
    'dbname'   => 'test'
));

$db->getConnection();
$data = $db->fetchRow('SELECT * FROM actions', 2);
var_dump($data);


Expected result:
----------------
The var_dump of $data variable.

Actual result:
--------------
faure# gdb php
GNU gdb 6.1.1 [FreeBSD]
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i386-marcel-freebsd"...
(gdb) run index.php
Starting program: /usr/local/bin/php index.php
[New LWP 100190]
[New Thread 0x28759300 (LWP 100190)]

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x28759300 (LWP 100190)]
0x081a40e9 in _zend_is_inconsistent (ht=0x0, file=0x8295be8 "/usr/ports/lang/php5/work/php-5.2.5/Zend/zend_hash.c", line=1209)
    at /usr/ports/lang/php5/work/php-5.2.5/Zend/zend_hash.c:54
54      /usr/ports/lang/php5/work/php-5.2.5/Zend/zend_hash.c: No such file or directory.
        in /usr/ports/lang/php5/work/php-5.2.5/Zend/zend_hash.c
(gdb) 


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2008-04-11 06:37 UTC] andrea dot granata at starnetsrl dot it
Hi, 

same problem with 5.2.6 RC6. compiled with

./configure --with-layout=GNU --with-config-file-scan-dir=/usr/local/etc/php --disable-all --enable-libxml --with-libxml-dir=/usr/local --enable-reflection --program-prefix= --disable-cgi --with-regex=php --with-zend-vm=CALL --enable-debug --prefix=/usr/local --mandir=/usr/local/man --infodir=/usr/local/info/ --with-pdo-pgsql


Starting program: /usr/src/php5.2-200804110430/sapi/cli/php index.php
[New LWP 100142]
[New Thread 0x28759400 (LWP 100142)]

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x28759400 (LWP 100142)]
0x081a2849 in _zend_is_inconsistent (ht=0x0, file=0x8297af0 "/usr/src/php5.2-200804110430/Zend/zend_hash.c", line=1015)
    at /usr/src/php5.2-200804110430/Zend/zend_hash.c:53
53              if (ht->inconsistent==HT_OK) {
 [2008-04-11 14:03 UTC] felipe@php.net
Thank you for this bug report. To properly diagnose the problem, we
need a backtrace to see what is happening behind the scenes. To
find out how to generate a backtrace, please read
http://bugs.php.net/bugs-generating-backtrace.php for *NIX and
http://bugs.php.net/bugs-generating-backtrace-win32.php for Win32

Once you have generated a backtrace, please submit it to this bug
report and change the status back to "Open". Thank you for helping
us make PHP better.

Please. Can you post the full backtrace?
 [2008-04-11 14:24 UTC] andrea dot granata at starnetsrl dot it
Hi Felipe.

Here's the full backtrace

(gdb) bt
#0  0x081a2849 in _zend_is_inconsistent (ht=0x0, file=0x8297af0 "/usr/src/php5.2-200804110430/Zend/zend_hash.c", line=1015)
    at /usr/src/php5.2-200804110430/Zend/zend_hash.c:53
#1  0x081a55a1 in zend_hash_num_elements (ht=0x0) at /usr/src/php5.2-200804110430/Zend/zend_hash.c:1015
#2  0x296331c4 in pgsql_stmt_param_hook () from /usr/local/lib/php/20060613-debug/pdo_pgsql.so
#3  0x292175b6 in zim_PDOStatement_execute () from /usr/local/lib/php/20060613-debug/pdo.so
#4  0x081be240 in zend_do_fcall_common_helper_SPEC (execute_data=0xbfbfc5c8) at zend_vm_execute.h:200
#5  0x081beedd in ZEND_DO_FCALL_BY_NAME_SPEC_HANDLER (execute_data=0xbfbfc5c8) at zend_vm_execute.h:322
#6  0x081bdd92 in execute (op_array=0x29866f10) at zend_vm_execute.h:92
#7  0x081be3ba in zend_do_fcall_common_helper_SPEC (execute_data=0xbfbfc9e8) at zend_vm_execute.h:234
#8  0x081beedd in ZEND_DO_FCALL_BY_NAME_SPEC_HANDLER (execute_data=0xbfbfc9e8) at zend_vm_execute.h:322
#9  0x081bdd92 in execute (op_array=0x2988a824) at zend_vm_execute.h:92
#10 0x081be3ba in zend_do_fcall_common_helper_SPEC (execute_data=0xbfbfccb8) at zend_vm_execute.h:234
#11 0x081beedd in ZEND_DO_FCALL_BY_NAME_SPEC_HANDLER (execute_data=0xbfbfccb8) at zend_vm_execute.h:322
#12 0x081bdd92 in execute (op_array=0x2874f6f8) at zend_vm_execute.h:92
#13 0x081be3ba in zend_do_fcall_common_helper_SPEC (execute_data=0xbfbfcff8) at zend_vm_execute.h:234
#14 0x081beedd in ZEND_DO_FCALL_BY_NAME_SPEC_HANDLER (execute_data=0xbfbfcff8) at zend_vm_execute.h:322
#15 0x081bdd92 in execute (op_array=0x2988bd64) at zend_vm_execute.h:92
#16 0x081be3ba in zend_do_fcall_common_helper_SPEC (execute_data=0xbfbfd238) at zend_vm_execute.h:234
#17 0x081beedd in ZEND_DO_FCALL_BY_NAME_SPEC_HANDLER (execute_data=0xbfbfd238) at zend_vm_execute.h:322
#18 0x081bdd92 in execute (op_array=0x2988d744) at zend_vm_execute.h:92
#19 0x081be3ba in zend_do_fcall_common_helper_SPEC (execute_data=0xbfbfd4c8) at zend_vm_execute.h:234
#20 0x081beedd in ZEND_DO_FCALL_BY_NAME_SPEC_HANDLER (execute_data=0xbfbfd4c8) at zend_vm_execute.h:322
#21 0x081bdd92 in execute (op_array=0x2871d9b0) at zend_vm_execute.h:92
#22 0x081984d2 in zend_execute_scripts (type=8, retval=0x0, file_count=3) at /usr/src/php5.2-200804110430/Zend/zend.c:1134
#23 0x081456a6 in php_execute_script (primary_file=0xbfbfeb70) at /usr/src/php5.2-200804110430/main/main.c:2005
#24 0x0821757c in main (argc=2, argv=0xbfbfec58) at /usr/src/php5.2-200804110430/sapi/cli/php_cli.c:1140
 [2008-04-12 01:16 UTC] jani@php.net
Interesting that the pdo* crap doesn't have debugging info? Did you remember to 'make install' when you recompiled PHP with --enable-debug? And you're sure you're loading the correct extensions from correct extension_dir in your php.ini?
 [2008-04-20 01:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 19 23:01:28 2024 UTC