Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20110722081910.GA3593@albatros>
Date: Fri, 22 Jul 2011 12:19:10 +0400
From: Vasiliy Kulikov <segoon@...nwall.com>
To: musl@...ts.openwall.com
Subject: Re: some fixes to musl

On Thu, Jul 21, 2011 at 23:00 +0400, Solar Designer wrote:
> Personally, I've been using different approaches to this in different
> ones of my programs.  For musl, I think the "always check" approach may
> be the better one.  Yes, the code size increase from those error
> handling paths is unfortunate...  Some use of goto can make them smaller
> and keep them out of the same cache lines with actually running code.

The problem here is that there might be no good way to handle errors
of error handling code.  If we allocate resource A, then B, and B
allocation fails, we should release A and return error code.  What to do
if releasing A fails?  Return error code and leave A allocated
(==leaked)?  Try to release it in a cycle (potential infinite loop)?
Terminate the process (not expected by the caller)?

I don't have a good solution...

-- 
Vasiliy

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.