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

Re: [HACKERS] patch for memory overrun on Linux(i386)

From: ocie(at)paracel(dot)com
To: mgittens(at)david(dot)gits(dot)nl (Maurice Gittens)
Cc: hackers(at)postgreSQL(dot)org
Subject: Re: [HACKERS] patch for memory overrun on Linux(i386)
Date: 1998-03-22 00:37:34
Message-ID: 9803220037.AA03698@dolomite.paracel.com (view raw or flat)
Thread:
Lists: pgsql-hackers
Maurice Gittens wrote:
> 
> Hi,
> 
> It turns of that one of the bugs I detected with Electric Fence
> is caused by an assumption that memory return by palloc and malloc 
> is aligned on 8 bytes boundaries (double alignment). 
> Adjusting this to correspond with the reality of the malloc
> implementation on my pentium based linux box fixes the problem.
> 
> The following simple patch to include/utils/memutils.h
> will fix the problem.
> 
> 85c85
> < #if ! defined(sco)
> ---
> > #if ! defined(sco) && !defined(linux)

I may be off on this one, but I thought that memory alignment was a
cpu, and not necessarily an OS issue.  I.E. Solaris x86 might show the
"misalignment", while Linux Alpha would not.

Ocie Mitchell

In response to

Responses

pgsql-hackers by date

Next:From: The Hermit HackerDate: 1998-03-22 01:26:18
Subject: Re: [HACKERS] patch for memory overrun on Linux(i386)
Previous:From: The Hermit HackerDate: 1998-03-21 23:55:39
Subject: Re: [HACKERS] patch for memory overrun on Linux(i386)

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