GNU bug report logs - #12316
Simplify redefinition of 'abort'.

Previous Next

Package: emacs;

Reported by: Paul Eggert <eggert <at> cs.ucla.edu>

Date: Fri, 31 Aug 2012 03:17:02 UTC

Severity: normal

Tags: patch

Done: Paul Eggert <eggert <at> cs.ucla.edu>

Bug is archived. No further changes may be made.

Full log


Message #14 received at 12316 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Paul Eggert <eggert <at> cs.ucla.edu>
Cc: lekktu <at> gmail.com, 12316 <at> debbugs.gnu.org
Subject: Re: Simplify redefinition of 'abort'.
Date: Fri, 31 Aug 2012 17:29:02 +0300
> Date: Fri, 31 Aug 2012 05:53:14 -0700
> From: Paul Eggert <eggert <at> cs.ucla.edu>
> CC: 12316 <at> debbugs.gnu.org, lekktu <at> gmail.com
> 
> Due to the change, POSIX platforms define a function
> emacs_abort rather than replacing the system 'abort'.

But this is not equivalent to the old code: with your changes, only
those calls to 'abort' that originate within Emacs sources will wind
up at 'emacs_abort'.  E.g., if a function from one of the libraries
linked into Emacs, like the image libraries, calls 'abort', that will
bypass our function.  Why is it a good idea to lose this
functionality?

And if we do want to lose this, why not simply replace all the calls
to 'abort' with calls to 'emacs_abort'?  Isn't that cleaner?

> To keep in sync with that, the MS-Windows part of the patch
> renames w32_abort to emacs_abort.

I don't see this part in your patches.  Where is it?  Without this, I
cannot see how this will possibly work.

> Also, this redefinition of 'abort' provides another
> reason why conf_post.h must include <stdlib.h>, which makes
> its comment about 'environ' confusing.  To help remove this
> confusion I modified nt/inc/unistd.h to include <stdlib.h>;

Please don't do that.  A standard header should not include another
standard header; I don't want our private emulations violate this
rule, to avoid conflicts.  Surely, there are better and more
straight-forward ways of dealing with outdated comments.




This bug report was last modified 12 years and 257 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.