Re: BUG #3901: Received error - Mailing list pgsql-bugs

From Tom Lane
Subject Re: BUG #3901: Received error
Date
Msg-id 4338.1201290226@sss.pgh.pa.us
Whole thread Raw
In response to Re: BUG #3901: Received error  ("Chris Hoover" <revoohc@gmail.com>)
List pgsql-bugs
"Chris Hoover" <revoohc@gmail.com> writes:
> #3  0x082c8fa6 in ExceptionalCondition (
>     conditionName=0x83bc514 "!(((header->context) != ((void *)0) &&
> (((((Node*)((header->context)))->type) == T_AllocSetContext))))",
> errorType=0x82f89d2 "BadArgument", fileName=0xd3f "", lineNumber=0) at
> assert.c:57
> #4  0x082e58ce in pfree (pointer=0x89cde14) at mcxt.c:589
> #5  0x081f9620 in SysLogger_Start () at syslogger.c:1172

Ah-hah: copy-and-paste-o.  This chunk of code is assigning the
wrong thing to last_csvfile_name.

        /* instead of pfree'ing filename, remember it for next time */
        if (last_csvfile_name != NULL)
            pfree(last_csvfile_name);
        last_csvfile_name = filename;
    }

This is a bit distressing in terms of the apparent lack of developer
testing on the CSV code; this should have been caught by anyone who'd
used CSV logging with --enable-cassert for any length of time.

            regards, tom lane

pgsql-bugs by date:

Previous
From: "Chris Hoover"
Date:
Subject: Re: BUG #3901: Received error
Next
From: "Peter Koczan"
Date:
Subject: BUG #3902: Segmentation faults using GSSAPI authentication