Re: Segfault using heap_form_tuple - Mailing list pgsql-hackers

From Claudio Rossi
Subject Re: Segfault using heap_form_tuple
Date
Msg-id JZ2MOZ$5D0E7244B1C97C7FDB2AB2D1D8FDDF42@libero.it
Whole thread Raw
In response to Segfault using heap_form_tuple  ("Claudio Rossi" <wind.claudio@inwind.it>)
List 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
errorsequence: 

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

I'm clueless, any hints?



pgsql-hackers by date:

Previous
From: Heikki Linnakangas
Date:
Subject: Re: Commit fest queue
Next
From: "Claudio Rossi"
Date:
Subject: Re: Segfault using heap_form_tuple