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: 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 Previous Comments: ------------------------------------------------------------------------ [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. ------------------------------------------------------------------------ [2002-01-15 16:41:25] charlie at charliedyson dot net Here are two sample pages that cause the crash on my machine: == login.php == <? session_start(); session_register("isloggedin"); $HTTP_SESSION_VARS["isloggedin"]=0 ?> <html> <body> You are logged in.<br/> <a href="logout.php">Click here</a> to log-out.<br/> </body> </html> == CUT == == logout.php == <? session_unregister("isloggedin"); session_destroy(); ?> <html> <body> You are now logged - out. <a href="login.php">Click here</a> to log-in again. <br/> <?= session_id() ?><br/> </body> </html> == CUT == I also made some small changes to my php.ini file, starting with php.ini-reccomended. Here is the output of diff php.ini-recommended php.ini: 683c683 < session.save_path = /tmp --- > session.save_path = /tmp/phpsess 690c690 < session.name = PHPSESSID --- > session.name = POSSUMSESSID == CUT == Hope this helps, Charlie Dyson - char...@charliedyson.net ------------------------------------------------------------------------ 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