Skip site navigation (1) Skip section navigation (2)

Re: memory-related bugs

From: Daniel Farina <daniel(at)heroku(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Noah Misch <noah(at)leadboat(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: memory-related bugs
Date: 2011-09-08 20:12:25
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
On Tue, Sep 6, 2011 at 12:00 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> [ Sorry for letting this slip through the cracks ... I think I got
>  distracted by collation bugs :-( ]
> Noah Misch <noah(at)leadboat(dot)com> writes:
>> On Sat, Mar 12, 2011 at 12:44:29PM -0500, Tom Lane wrote:
>>> Noah Misch <noah(at)leadboat(dot)com> 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))
>> +             namestrcpy(&(att->attname), attributeName);
> 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
cause an infinite loop on ssse3 architectures, having to do with some
backwards-iteration it does:

I have spotted this in the wild in PostgreSQL (which is how I happened
to produce this bug report link so readily), yet very rarely; I mailed
a more detailed report to the security list.


In response to


pgsql-hackers by date

Next:From: Peter GeogheganDate: 2011-09-08 20:45:56
Subject: Re: Large C files
Previous:From: Peter EisentrautDate: 2011-09-08 19:35:42
Subject: Re: [COMMITTERS] pgsql: Add missing format argument to ecpg_log() call

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group