Re: Segfault using heap_form_tuple

From: "Claudio Rossi" <wind(dot)claudio(at)inwind(dot)it>
To: "pavan\(dot)deolasee" <pavan(dot)deolasee(at)gmail(dot)com>
Cc: "pgsql-hackers" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Segfault using heap_form_tuple
Date: 2008-04-09 18:43:47
Message-ID: JZ2MOZ$5D0E7244B1C97C7FDB2AB2D1D8FDDF42@libero.it
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> > nulls = (bool *)palloc(natts*sizeof(bool *));
> >
>
> May not be related to segfault you are seeing, but this looks completely wrong.
> You want array of bool and not (bool *).

Yeah, you are right but in the original code it's:

values = (Datum *) palloc(natts * sizeof(Datum));
nulls = (bool *) palloc(natts * sizeof(bool));

I just typed it wrong, I didn't copy and paste. I also forgot to add this line (from valgrind log) at the beginning of error sequence:

==30549== Warning: set address range perms: large range 496753892 (undefined)

I'm clueless, any hints?

Browse pgsql-hackers by date

  From Date Subject
Next Message Claudio Rossi 2008-04-09 18:56:26 Re: Segfault using heap_form_tuple
Previous Message Heikki Linnakangas 2008-04-09 18:19:13 Re: Commit fest queue