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

patch for memory overrun on Linux(i386)

From: Maurice Gittens <mgittens(at)david(dot)gits(dot)nl>
To: hackers(at)postgresql(dot)org
Subject: patch for memory overrun on Linux(i386)
Date: 1998-03-21 18:44:12
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers

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.

< #if ! defined(sco)
> #if ! defined(sco) && !defined(linux)

There is still another buffer overrun which I will try to find. 
The remaining one is triggered by creating a sequence.

I hope this patch will be applied if it makes sense to 
you guys.

With regards from Maurice.


pgsql-hackers by date

Next:From: Hannu KrosingDate: 1998-03-21 19:58:56
Subject: Re: expr ? trueval : falseval
Previous:From: The Hermit HackerDate: 1998-03-21 18:42:02
Subject: Re: [HACKERS] Newest Patch...try this one...

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