From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: YAMAMOTO Mitsuharu Newsgroups: gmane.emacs.bugs Subject: bug#18222: 24.3.92; fork handlers in gmalloc.c can lead to deadlock Date: Mon, 25 Aug 2014 13:15:21 +0900 Organization: Faculty of Science, Chiba University Message-ID: References: <53E4CC0B.2060200@cornell.edu> <53E67553.9090102@cornell.edu> <53E82787.7030505@cornell.edu> <53E8E145.3090307@cornell.edu> <53F8BA88.4030904@cornell.edu> <83sikll2bl.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII X-Trace: ger.gmane.org 1408940187 32273 80.91.229.3 (25 Aug 2014 04:16:27 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 25 Aug 2014 04:16:27 +0000 (UTC) Cc: peterhull90@gmail.com, 18222@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Aug 25 06:16:20 2014 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1XLlhc-0007Np-6o for geb-bug-gnu-emacs@m.gmane.org; Mon, 25 Aug 2014 06:16:20 +0200 Original-Received: from localhost ([::1]:46174 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XLlhb-0001pa-I7 for geb-bug-gnu-emacs@m.gmane.org; Mon, 25 Aug 2014 00:16:19 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:60752) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XLlhS-0001oO-Sk for bug-gnu-emacs@gnu.org; Mon, 25 Aug 2014 00:16:16 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XLlhK-00024B-K9 for bug-gnu-emacs@gnu.org; Mon, 25 Aug 2014 00:16:10 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:44337) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XLlhK-000243-HU for bug-gnu-emacs@gnu.org; Mon, 25 Aug 2014 00:16:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1XLlhJ-000750-Sx for bug-gnu-emacs@gnu.org; Mon, 25 Aug 2014 00:16:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: YAMAMOTO Mitsuharu Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 25 Aug 2014 04:16:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 18222 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 18222-submit@debbugs.gnu.org id=B18222.140894012927173 (code B ref 18222); Mon, 25 Aug 2014 04:16:01 +0000 Original-Received: (at 18222) by debbugs.gnu.org; 25 Aug 2014 04:15:29 +0000 Original-Received: from localhost ([127.0.0.1]:51280 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XLlgm-00074D-NW for submit@debbugs.gnu.org; Mon, 25 Aug 2014 00:15:29 -0400 Original-Received: from mathmail.math.s.chiba-u.ac.jp ([133.82.132.2]:50190) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XLlgi-00073y-QS for 18222@debbugs.gnu.org; Mon, 25 Aug 2014 00:15:26 -0400 Original-Received: from fermat.math.s.chiba-u.ac.jp (fermat [133.82.132.10]) by mathmail.math.s.chiba-u.ac.jp (Postfix) with ESMTP id 296B5C0560; Mon, 25 Aug 2014 13:15:21 +0900 (JST) In-Reply-To: <83sikll2bl.fsf@gnu.org> User-Agent: Wanderlust/2.14.0 (Africa) SEMI/1.14.6 (Maruoka) FLIM/1.14.8 (=?UTF-8?Q?Shij=C5=8D?=) APEL/10.6 Emacs/22.3 (sparc-sun-solaris2.8) MULE/5.0 (SAKAKI) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:92651 Archived-At: >>>>> On Mon, 25 Aug 2014 05:39:58 +0300, Eli Zaretskii said: >> Date: Mon, 25 Aug 2014 08:28:59 +0900 From: YAMAMOTO Mitsuharu >> Cc: Peter Hull >> , 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