On Tue, 2004-09-07 at 23:36, Tom Lane wrote:
> Rafael Martinez <r.m.guerrero@usit.uio.no> writes:
> > I got this from one of our developers (from the core dump generated by
> > 7.3.7 without --enable-debug):
>
> > (gdb) inspect *att[i]
> > $3 = {attrelid = 0, attname = {data = '\0' <repeats 63 times>,
> > alignmentDummy = 0}, atttypid = 1700, attstattarget = -1, attlen = -1,
> > attnum = 2, attndims = 0, attcacheoff = -1, atttypmod = 393220, attbyval
> > = 0 '\0', attstorage = 109 'm', attisset = 0 '\0', attalign = 105 'i',
> > attnotnull = 0 '\0', atthasdef = 0 '\0', attisdropped = 0 '\0',
> > attislocal = 1 '\001', attinhcount = 0}
>
> That looks reasonable ...
>
> > (gdb) inspect data
> > $4 = 0xb7489000 <Address 0xb7489000 out of bounds>
>
> > (gdb) inspect value[i]
> > $5 = 3054556648
>
> Hmm, what do you get from "x/10 3054556648" ? Also, it'd be worth
> looking at the contents of *att[0] to see if that's also sensible,
> as well as value[0] and wherever that points (if it's a pointer).
>
> regards, tom lane
(gdb) x/10 3054556648
0xb610d5e8: 0x2f00000c 0x00000002 0x30170000
0x020c6172
0xb610d5f8: 0x00000000 0x00000000 0x00ae0000
0x0006002b
0xb610d608: 0x2f1c0913 0x0404b70b
(gdb) inspect att[0]
$1 = 0x82fd660
(gdb) inspect *att[0]
$2 = {attrelid = 0, attname = {data = '\0' <repeats 63 times>,
alignmentDummy = 0}, atttypid = 1700, attstattarget = -1, attlen = -1,
attnum = 1, attndims = 0, attcacheoff = 0, atttypmod = 786436, attbyval
= 0 '\0', attstorage = 109 'm', attisset = 0 '\0', attalign = 105 'i',
attnotnull = 0 '\0', atthasdef = 0 '\0', attisdropped = 0 '\0',
attislocal = 1 '\001', attinhcount = 0}
(gdb) inspect value[0]
$3 = 3054556612
(gdb) inspect *value[0]
$4 = 12
--
Rafael Martinez, <r.m.guerrero@usit.uio.no>
Center for Information Technology Services
University of Oslo, Norway