oid2name core dump

From: Michael Fuhr <mike(at)fuhr(dot)org>
To: pgsql-bugs(at)postgresql(dot)org
Subject: oid2name core dump
Date: 2004-12-02 04:41:49
Message-ID: 20041202044149.GA60520@winnie.fuhr.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

PostgreSQL 8.0.0beta5 (CVS HEAD)
Solaris 9
gcc 3.4.2

oid2name consistently dumps core:

% oid2name -d test -f 77199
>From database "test":
Segmentation fault (core dumped)

(gdb) where
#0 0xfee473ec in realfree () from /usr/lib/libc.so.1
#1 0xfee47cec in cleanfree () from /usr/lib/libc.so.1
#2 0xfee46e18 in _malloc_unlocked () from /usr/lib/libc.so.1

On FreeBSD 4.10-STABLE oid2name runs but prints warnings about
freeing junk pointers:

% oid2name -d test -f 173181
>From database "test":
oid2name in free(): warning: junk pointer, too low to make sense
oid2name in free(): warning: junk pointer, too low to make sense
Filenode Table Name
----------------------
173181 foo

The warnings are coming from these two lines (around lines 448 and 449):

free(comma_oids);
free(comma_tables);

Apparently the values of comma_oids and comma_tables are bogus.
I haven't looked more closely yet to see why.

--
Michael Fuhr
http://www.fuhr.org/~mfuhr/

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Michael Fuhr 2004-12-02 04:55:13 Re: oid2name core dump
Previous Message Stephan Szabo 2004-12-01 22:25:29 Re: Foreign keys referencing parent table fails on insert