Re: [HACKERS] memory-related bugs

2011-09-09 Thread Daniel Farina
On Thu, Sep 8, 2011 at 1:56 PM, Tom Lane wrote: > Daniel Farina writes: >> On Tue, Sep 6, 2011 at 12:00 PM, Tom Lane wrote: >>> I'm still of the opinion that there's no real need to avoid memcpy with >>> identical source and destination, so I didn't apply this first patch. > >> I am leery of mem

Re: [HACKERS] memory-related bugs

2011-09-08 Thread Tom Lane
Daniel Farina writes: > On Tue, Sep 6, 2011 at 12:00 PM, Tom Lane wrote: >> I'm still of the opinion that there's no real need to avoid memcpy with >> identical source and destination, so I didn't apply this first patch. > I am leery of memcpy with overlapping regions. I know that it can > caus

Re: [HACKERS] memory-related bugs

2011-09-08 Thread Daniel Farina
On Tue, Sep 6, 2011 at 12:00 PM, Tom Lane wrote: > [ Sorry for letting this slip through the cracks ... I think I got >  distracted by collation bugs :-( ] > > Noah Misch writes: >> On Sat, Mar 12, 2011 at 12:44:29PM -0500, Tom Lane wrote: >>> Noah Misch writes: A suitably-instrumented run

Re: [HACKERS] memory-related bugs

2011-09-06 Thread Noah Misch
On Tue, Sep 06, 2011 at 03:00:42PM -0400, Tom Lane wrote: > Noah Misch writes: > > On Sat, Mar 12, 2011 at 12:44:29PM -0500, Tom Lane wrote: > >> I wonder whether we should instead fix this by copying the correct tuple > >> length. > > > Seems like a step in the wrong direction. We only use typl

Re: [HACKERS] memory-related bugs

2011-09-06 Thread Tom Lane
[ Sorry for letting this slip through the cracks ... I think I got distracted by collation bugs :-( ] Noah Misch writes: > On Sat, Mar 12, 2011 at 12:44:29PM -0500, Tom Lane wrote: >> Noah Misch writes: >>> A suitably-instrumented run of "make installcheck-world" under valgrind >>> turned >>>

Re: [HACKERS] memory-related bugs

2011-09-05 Thread Tom Lane
Bruce Momjian writes: > Did we conclude any of these were useful? > http://archives.postgresql.org/pgsql-hackers/2011-03/msg00856.php > I know there were concerns about some of them in the thread. Hmm, I guess this slipped through the cracks. I thought that avoiding memcpy(x, x, n) was unn

Re: [HACKERS] memory-related bugs

2011-09-05 Thread Bruce Momjian
Noah Misch wrote: > A suitably-instrumented run of "make installcheck-world" under valgrind turned > up a handful of memory-related bugs: > > * memcpy()/strncpy() between overlapping regions > uniqueentry() and dispell_lexize() both deduplicate an array by iteratively > copying elements downward t

Re: [HACKERS] memory-related bugs

2011-03-13 Thread Noah Misch
On Sat, Mar 12, 2011 at 12:44:29PM -0500, Tom Lane wrote: > Noah Misch writes: > > A suitably-instrumented run of "make installcheck-world" under valgrind > > turned > > up a handful of memory-related bugs: > > Hmm, interesting work, but I don't think I believe in the necessity for > this kluge:

Re: [HACKERS] memory-related bugs

2011-03-13 Thread Noah Misch
On Sat, Mar 12, 2011 at 04:08:23PM +, Greg Stark wrote: > On Sat, Mar 12, 2011 at 1:32 PM, Noah Misch wrote: > > A suitably-instrumented run of "make installcheck-world" under valgrind > > turned > > up a handful of memory-related bugs: > > > Nice work. How did you instrument things so valg

Re: [HACKERS] memory-related bugs

2011-03-12 Thread Tom Lane
Noah Misch writes: > A suitably-instrumented run of "make installcheck-world" under valgrind turned > up a handful of memory-related bugs: Hmm, interesting work, but I don't think I believe in the necessity for this kluge: > + else if (attributeName != &(att->attname)) > + namest

Re: [HACKERS] memory-related bugs

2011-03-12 Thread Greg Stark
On Sat, Mar 12, 2011 at 1:32 PM, Noah Misch wrote: > A suitably-instrumented run of "make installcheck-world" under valgrind turned > up a handful of memory-related bugs: Nice work. How did you instrument things so valgrind knew about palloc et al? I remember trying this in the past and running

[HACKERS] memory-related bugs

2011-03-12 Thread Noah Misch
A suitably-instrumented run of "make installcheck-world" under valgrind turned up a handful of memory-related bugs: * memcpy()/strncpy() between overlapping regions uniqueentry() and dispell_lexize() both deduplicate an array by iteratively copying elements downward to occlude the duplicates. Bef