bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#18222: 24.3.92; fork handlers in gmalloc.c can lead to deadlock


From: YAMAMOTO Mitsuharu
Subject: bug#18222: 24.3.92; fork handlers in gmalloc.c can lead to deadlock
Date: Mon, 25 Aug 2014 13:15:21 +0900
User-agent: Wanderlust/2.14.0 (Africa) SEMI/1.14.6 (Maruoka) FLIM/1.14.8 (Shijō) APEL/10.6 Emacs/22.3 (sparc-sun-solaris2.8) MULE/5.0 (SAKAKI)

>>>>> On Mon, 25 Aug 2014 05:39:58 +0300, Eli Zaretskii <eliz@gnu.org> said:

>> Date: Mon, 25 Aug 2014 08:28:59 +0900 From: YAMAMOTO Mitsuharu
>> <mituharu@math.s.chiba-u.ac.jp> Cc: Peter Hull
>> <peterhull90@gmail.com>, 18222@debbugs.gnu.org
>> 
>> I think it's worth trying also on other platforms that use gmalloc.

> The problem is how to write the DUMPED and ALLOCATED_BEFORE_DUMPING
> macros.  For Cygwin, they use some intimate knowledge about Cygwin
> runtime internals; the question is, do other platforms have similar
> facilities and features.

If the system malloc always returns a 16-byte aligned address (I'm not
sure if that is the case for *BSDs), and if we actually only need
8-byte alignment for memory allocated before dumping, then we can
determine whether the address has been allocated before dumping or not
by tweaking the address returned by malloc before dumping so it always
returns a value p such that (p & 8) == 8.  Actually this is how
unexec_malloc etc. in unexmacosx.c work.

                                     YAMAMOTO Mitsuharu
                                mituharu@math.s.chiba-u.ac.jp





reply via email to

[Prev in Thread] Current Thread [Next in Thread]