delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2001/01/07/01:27:39

Date: Sun, 7 Jan 2001 08:25:52 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
X-Sender: eliz AT is
To: "Mark E." <snowball3 AT bigfoot DOT com>
cc: djgpp-workers AT delorie DOT com
Subject: Re: valloc and memalign draft
In-Reply-To: <3A55C132.12287.6F26E9@localhost>
Message-ID: <Pine.SUN.3.91.1010107082143.21289C-100000@is>
MIME-Version: 1.0
Reply-To: djgpp-workers AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: djgpp-workers AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

On Fri, 5 Jan 2001, Mark E. wrote:

> +   /* Temporarily clear chunk-in-use bit so macros work correctly.  */
> +   b1->size &= ~1;

Isn't this a bit dangerous?  Doesn't it leave the malloc chain in an 
inconsistent state, for a small window of opportunities?  What if some 
signal (i.e. exception) strikes between this line and where you restore 
the bit, and the code run from the signal handler calls memalign?

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019