Edit report at http://bugs.php.net/bug.php?id=15020&edit=1

 ID:                 15020
 Comment by:         harman dot birdi at gmail dot com
 Reported by:        charlie at charliedyson dot net
 Summary:            Segfault - something to do with arBuckets
 Status:             No Feedback
 Type:               Bug
 Package:            Session related
 Operating System:   Linux (SuSE 7.2)
 PHP Version:        4.1.1
 Block user comment: N
 Private report:     N

 New Comment:

Should have added this gdb output to my last entry.





$ gdb sapi/cli/php

GNU gdb (GDB) Red Hat Enterprise Linux (7.0.1-23.el5_5.2)

Copyright (C) 2009 Free Software Foundation, Inc.

License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>

This is free software: you are free to change and redistribute it.

There is NO WARRANTY, to the extent permitted by law.  Type "show copying"

and "show warranty" for details.

This GDB was configured as "i386-redhat-linux-gnu".

For bug reporting instructions, please see:

<http://www.gnu.org/software/gdb/bugs/>...

Reading symbols from ~/software/php-5.1.6/sapi/cli/php...done.

(gdb) r

Starting program: ~/software/php-5.1.6/sapi/cli/php 

[Thread debugging using libthread_db enabled]



Program received signal SIGSEGV, Segmentation fault.

0x082432a1 in _zend_hash_add_or_update (ht=0x8367820, arKey=0x82d0385 

"informix", nKeyLength=8, pData=0xbfffe510, nDataSize=4, pDest=0x0, flag=2, 

    __zend_filename=0x82cc980 "~/software/php-5.1.6/ext/pdo/pdo.c", 

__zend_lineno=171)

    at ~/software/php-5.1.6/Zend/zend_hash.c:213

213             p = ht->arBuckets[nIndex];

(gdb)


Previous Comments:
------------------------------------------------------------------------
[2011-06-02 01:30:49] harman dot birdi at gmail dot com

I am trying to compile this using pdo_informix, and getting the same issue. 

Segfault in php-5.1.6/Zend/zend_hash.c (nned to use php-5.1.6)

If I don't build pdo_informix, then everything goes fine. Would appreciate

any help to resolve this. I have tried PDO-INFORMIX-1.0.0 and the latest one.





It bombs on line 213 - p = ht->arBuckets[nIndex];



I am building this on RHEL5.5



Linux ******* 2.6.18-194.11.3.el5PAE #1 SMP Mon Aug 23 15:57:10 EDT 2010 i686 

i686 i386 GNU/Linux



$ ./sapi/cli/php  -m

Segmentation fault

$ 







$ /usr/local/apache2/bin/httpd -v

Server version: Apache/2.2.3

Server built:   May 31 2011 16:43:58

$ 



My configure line



$ ./configure --with-apxs2=/usr/local/apache2/bin/apxs --enable-debug --disable-

ftp --disable-inline-optimization --disable-magic-quotes --disable-mbstring --

enable-wddx=shared --enable-xml --with-dom --with-regex=system --with-xml --

with-jpeg-dir=/usr/lib --with-zlib-dir=/usr/lib --with-zlib 
--without-pdo-sqlite 

--without-iconv --without-sqlite --enable-shared --enable-pdo --with-pdo-

informix=$INFORMIXDIR --with-informix=$INFORMIXDIR

------------------------------------------------------------------------
[2002-07-18 01:00:08] php-bugs at lists dot php dot net

No feedback was provided for this bug for over a month, 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".

------------------------------------------------------------------------
[2002-06-17 19:53:40] sni...@php.net

I can not reproduce this..can you please try this snapshot:



http://snaps.php.net/php4-latest.tar.gz



------------------------------------------------------------------------
[2002-05-04 16:09:11] charlie at charliedyson dot net

Not much I can do: I've never hacked PHP, and I'm kinda busy at the moment. 
Have you tried watching arBuckets (whatever that is) in gdb? Maybe one of those 
libc-allocation-function-replaceing-libraries will work (electric fence, etc). 
Good luck, and thanks again.



BTW: I've been working on a different project with PHP, and had no problems 
what-so-ever. This seems to be a pretty obscure thing. What does arBuckets do 
anyway?



Thanks,



Charlie Dyson - char...@charliedyson.net

------------------------------------------------------------------------
[2002-05-04 10:04:04] kimmo dot mustonen at hut dot fi

The same(?) problem occurs for me on Tru64 Unix 4.0f.

The problem has appeared between 4.0.6 and 4.1.0. 4.0.6 works fine, 4.1.0, 
4.1.1 and 4.2.0 just crash.



---<8---<8---

zend_hash.c:935 if ((p->h == h) && (p->nKeyLength == 0)) {

(gdb) print p

$1 = (Bucket *) 0x5a5a5a5a5a5a5a5a

(gdb) print ht->arBuckets[1]

$2 = (Bucket *) 0x5a5a5a5a5a5a5a5a

(gdb) print *ht

$3 = {nTableSize = 8, nTableMask = 7, nNumOfElements = 3, 

  nNextFreeElement = 4, pInternalPointer = 0x140114880, 

  pListHead = 0x140114880, pListTail = 0x0, arBuckets = 0x1400eea60, 

  pDestructor = 0x120068910 <list_entry_destructor>, persistent = 0 '\000', 

  nApplyCount = 0 '\000', bApplyProtection = 1 '\001', inconsistent = 0}

---8<---8<---

It seems that the arBuckets table is completely freed(?) or uninitialized(?) 
but is still tried to be used.

------------------------------------------------------------------------


The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at

    http://bugs.php.net/bug.php?id=15020


-- 
Edit this bug report at http://bugs.php.net/bug.php?id=15020&edit=1

Reply via email to