From: Operating system: Linux (Kubuntu) PHP version: 5.3.2 Package: PostgreSQL related Bug Type: Bug Bug description:Memory (de)allocation problem for pgsql notices
Description: ------------ In the ext/pgsql.c pgsql_globals->notices structure is allocated as persistent but individual messages non persistent. Thus the destructor _php_pgsql_notice_ptr_dtor happens to try to free memory that was already freed by the garbage collector and the thread exits with segmentation fault. Program received signal SIGSEGV, Segmentation fault. 0x00007ffff3cd3013 in _zend_mm_free_int (heap=0x7ffff844b5c0, p=0x7ffff9397390) at /usr/src/php_no_suhosin/php5-5.3.2/Zend/zend_alloc.c:2018 2018 if (ZEND_MM_IS_FREE_BLOCK(next_block)) { (gdb) backtrace #0 0x00007ffff3cd3013 in _zend_mm_free_int (heap=0x7ffff844b5c0, p=0x7ffff9397390) at /usr/src/php_no_suhosin/php5-5.3.2/Zend/zend_alloc.c:2018 #1 0x00007ffff3cd3de1 in _efree (ptr=0x7ffff9397390) at /usr/src/php_no_suhosin/php5-5.3.2/Zend/zend_alloc.c:2351 #2 0x00007fffeb4d3419 in _php_pgsql_notice_ptr_dtor (ptr=0x7ffff9396708) at /tmp/pgsql/pgsql.c:841 -- Edit bug report at http://bugs.php.net/bug.php?id=52389&edit=1 -- Try a snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=52389&r=trysnapshot52 Try a snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=52389&r=trysnapshot53 Try a snapshot (trunk): http://bugs.php.net/fix.php?id=52389&r=trysnapshottrunk Fixed in SVN: http://bugs.php.net/fix.php?id=52389&r=fixed Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=52389&r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=52389&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=52389&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=52389&r=needscript Try newer version: http://bugs.php.net/fix.php?id=52389&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=52389&r=support Expected behavior: http://bugs.php.net/fix.php?id=52389&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=52389&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=52389&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=52389&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=52389&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=52389&r=dst IIS Stability: http://bugs.php.net/fix.php?id=52389&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=52389&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=52389&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=52389&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=52389&r=mysqlcfg