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/