Skip site navigation (1) Skip section navigation (2)

Re: BUG #1440: ecpg seg faults

From: Edmund Bacon <ebacon(at)onesystem(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Michael Fuhr <mike(at)fuhr(dot)org>, pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #1440: ecpg seg faults
Date: 2005-01-24 20:17:11
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-bugs
You know, I should have been able to think of that:

njamd says:

(gdb) set env
(gdb) set env NJAMD_CHK_FREE=error
(gdb) r test_bad.pgc
Starting program: 
NJAMD/free: Double free of address 0x41454ff4

Program received signal SIGSEGV, Segmentation fault.
0x4010a671 in kill () from /lib/i686/
(gdb) bt
#0  0x4010a671 in kill () from /lib/i686/
#1  0x4010a405 in raise () from /lib/i686/
#2  0x4001f867 in __nj_underflow_free () from /usr/lib/
#3  0x4001fe93 in __nj_overflow_free () from /usr/lib/
#4  0x40021e87 in free () from /usr/lib/
#5  0x0805755f in remove_typedefs (brace_level=1073902784) at variable.c:271
#6  0x08049e02 in yyparse () at preproc.y:610
#7  0x08055db0 in main (argc=2, argv=0xbfffe254) at ecpg.c:424
#8  0x400f7a67 in __libc_start_main () from /lib/i686/

Tom Lane wrote:

>Edmund Bacon <ebacon(at)onesystem(dot)com> writes:
>>According to the backtrace, it appears to be dieing in malloc.
>That's consistent with the idea that the multiple free is the source of
>trouble --- multiple free() could corrupt malloc's private data
>structures to the point of causing a crash in a later malloc call.
>The least painful way of locating the problem would be to relink ecpg
>with a debugging malloc package, which could tell you exactly where the
>bad free() call is.  You'd probably want to rebuild with --enable-debug
>			regards, tom lane
>---------------------------(end of broadcast)---------------------------
>TIP 9: the planner will ignore your desire to choose an index scan if your
>      joining column's datatypes do not match

Edmund Bacon <ebacon(at)onesystem(dot)com>

In response to


pgsql-bugs by date

Next:From: Tom LaneDate: 2005-01-24 20:24:13
Subject: Re: BUG #1440: ecpg seg faults
Previous:From: Tom LaneDate: 2005-01-24 20:03:37
Subject: Re: BUG #1440: ecpg seg faults

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group