PHP 4.0 Bug #5542 Updated: Binary Cores with shm_attach

From: Date: Fri, 29 Sep 2000 13:13:08 +0000
Subject: PHP 4.0 Bug #5542 Updated: Binary Cores with shm_attach
Groups: php.dev 
Request: Send a blank email to php-dev+get-33856@lists.php.net to get a copy of this message
ID: 5542 Updated by: sniper Reported By: justin@trailbreaker.com Status: Closed Bug Type: Reproduceable crash Assigned To: Comments: No feedback. --Jani Previous Comments: --------------------------------------------------------------------------- [2000-08-31 12:44:53] sniper@php.net Have you tried without zend-optimizer? And with php4.0.2 ? I can not reproduce this with php4.0.2 (but I don't have zend-optimizer) --Jani --------------------------------------------------------------------------- [2000-07-12 19:38:38] justin@trailbreaker.com the code below works find when run via the apache module but when I run it via the php binary I get a Sementation fault (core dumped). I am running PHP/4.0.1pl2 on RH Linux 6.1 with the Zend Engine v1.0.1 and Apache/1.3.9. The binary was configured/compiled like this: ./configure --with-mysql --enable-sysvshm and the apache module like this: ./configure --with-mysql --with-apxs --enable-sysvshm File: test.php ---------------------- <?php $key=9876; $data="hello123hello123"; $mem_id=shm_attach($key, 1000000 ,0600); print "the id is ".$mem_id." <BR>"; shm_put_var($mem_id, 200, $data); $whatswhat=shm_get_var($mem_id, 200); print "Now in shared memory is $whatswhat "; shm_detach($mem_id); ?> -----------GDB Output----------- Core was generated by `php test.php'. Program terminated with signal 11, Segmentation fault. Reading symbols from /usr/lib/libgdbm.so.2...done. Reading symbols from /lib/libpam.so.0...done. Reading symbols from /lib/libdl.so.2...done. Reading symbols from /usr/lib/libttf.so.2...done. Reading symbols from /usr/lib/libgd.so.1...done. Reading symbols from /lib/libresolv.so.2...done. Reading symbols from /lib/libm.so.6...done. Reading symbols from /lib/libcrypt.so.1...done. Reading symbols from /lib/libnsl.so.1...done. Reading symbols from /lib/libc.so.6...done. Reading symbols from /lib/ld-linux.so.2...done. Reading symbols from /usr/local/Zend/lib/ZendOptimizer.so...done. Reading symbols from /lib/libnss_files.so.2...done. #0 0x80bf2eb in php_if_shm_attach (ht=3, return_value=0x8173db4, this_ptr=0x0, return_value_used=1) at sysvshm.c:134 134 if(strcmp((char*)&(chunk_ptr->magic),"PHP_SM")!=0) { (gdb) bt #0 0x80bf2eb in php_if_shm_attach (ht=3, return_value=0x8173db4, this_ptr=0x0, return_value_used=1) at sysvshm.c:134 #1 0x401ea023 in zend_oe_ex () from /usr/local/Zend/lib/ZendOptimizer.so #2 0x401e0ef3 in zend_oe () from /usr/local/Zend/lib/ZendOptimizer.so #3 0x805fe07 in php_execute_script (primary_file=0xbffffc74) at main.c:1157 #4 0x805e3c9 in main (argc=2, argv=0xbffffcd4) at cgi_main.c:661 (gdb) quit --------------------------------------------------------------------------- Full Bug description available at: http://bugs.php.net/?id=5542

« previous php.dev (#33856) next »