Bug #13676 Updated: Missing FROM-clause Segfault

From: Date: Tue, 16 Oct 2001 07:12:05 +0000
Subject: Bug #13676 Updated: Missing FROM-clause Segfault
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-68008@lists.php.net to get a copy of this message
ID: 13676 User updated by: bryan@eevolved.com Reported By: bryan@eevolved.com Status: Open Bug Type: PostgreSQL related Operating System: Linux Mandrake 8.0 PHP Version: 4.0.6 New Comment: According to my most recent tests, this bug also applies to CREATE TABLE statements that implicitly create sequences. I have have observed a ~30% segfault rate with these statements as well. Previous Comments: ------------------------------------------------------------------------ [2001-10-15 16:21:58] bryan@eevolved.com Formulating an SQL query with missing FROM clauses will generate an apache segfault approximately 30% of the time it is executed, according to my tests. This *only* occurs with PostgreSQL > 7.1 in conjunction with php 4.0.6. Switching to older versions of either eliminates the bug,as does reformulating the SQL to contain the missing FROM clauses. When the crash occurs, PostgreSQL logs: NOTICE: Adding missing FROM-clause entry for table "bios" pq_recvbuf: unexpected EOF on client connection SCRIPT: ------- <? $link=pg_connect("dbname dbuser dbpass"); $q="SELECT name FROM users WHERE users.bio_id = bios.id AND bios.id=1; pg_exec($link,$q); ?> SAMPLE TABLES: -------------- CREATE TABLE users(char(20) name,int bio_id); CREATE TABLE bios(id serial,char(20) name); BACKTRACE: ---------- Program received signal SIGSEGV, Segmentation fault. 0x401d5f95 in shutdown_memory_manager (silent=1, clean_cache=0) at zend_alloc.c:449 449 REMOVE_POINTER_FROM_LIST(ptr); (gdb) bt #0 0x401d5f95 in shutdown_memory_manager (silent=1, clean_cache=0) at zend_alloc.c:449 #1 0x40200515 in php_request_shutdown (dummy=0x0) at main.c:667 #2 0x401fdf93 in php_apache_request_shutdown (dummy=0x0) at mod_php4.c:292 #3 0x080682a0 in run_cleanups () #4 0x08066a81 in ap_clear_pool () #5 0x08066b06 in ap_destroy_pool () #6 0x08066a6e in ap_clear_pool () #7 0x08076ff8 in child_main () #8 0x080775e4 in make_child () #9 0x08077758 in startup_children () #10 0x08077dd7 in standalone_main () #11 0x0807860f in main () #12 0x4009b1f0 in __libc_start_main () from /lib/libc.so.6 ------------------------------------------------------------------------ Edit this bug report at http://bugs.php.net/?id=13676&edit=1

« previous php.dev (#68008) next »