oid2name core dump - Mailing list pgsql-bugs

From Michael Fuhr
Subject oid2name core dump
Date
Msg-id 20041202044149.GA60520@winnie.fuhr.org
Whole thread Raw
Responses Re: oid2name core dump  (Michael Fuhr <mike@fuhr.org>)
Re: oid2name core dump  (Neil Conway <neilc@samurai.com>)
List 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/

pgsql-bugs by date:

Previous
From: Oliver Elphick
Date:
Subject: [Fwd: Bug#283856: postgresql: mistakes in src/backend/po/fr.po]
Next
From: Michael Fuhr
Date:
Subject: Re: oid2name core dump