From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Ken Brown Newsgroups: gmane.emacs.bugs Subject: bug#18222: 24.3.92; fork handlers in gmalloc.c can lead to deadlock Date: Mon, 25 Aug 2014 12:22:20 -0400 Message-ID: <53FB62BC.7050504@cornell.edu> 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> <53FB296D.4050301@cornell.edu> <83ppfolj1l.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1408983808 3069 80.91.229.3 (25 Aug 2014 16:23:28 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 25 Aug 2014 16:23:28 +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 18:23:21 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 1XLx3A-0003ir-Tp for geb-bug-gnu-emacs@m.gmane.org; Mon, 25 Aug 2014 18:23:21 +0200 Original-Received: from localhost ([::1]:49293 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XLx3A-0004EI-Dv for geb-bug-gnu-emacs@m.gmane.org; Mon, 25 Aug 2014 12:23:20 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:36418) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XLx31-0004DJ-JU for bug-gnu-emacs@gnu.org; Mon, 25 Aug 2014 12:23:16 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XLx2s-00041h-QV for bug-gnu-emacs@gnu.org; Mon, 25 Aug 2014 12:23:11 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:44958) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XLx2s-00041b-MF for bug-gnu-emacs@gnu.org; Mon, 25 Aug 2014 12:23:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1XLx2r-0001eV-Ux for bug-gnu-emacs@gnu.org; Mon, 25 Aug 2014 12:23:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Ken Brown Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 25 Aug 2014 16:23: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.14089837586311 (code B ref 18222); Mon, 25 Aug 2014 16:23:01 +0000 Original-Received: (at 18222) by debbugs.gnu.org; 25 Aug 2014 16:22:38 +0000 Original-Received: from localhost ([127.0.0.1]:51901 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XLx2P-0001da-MK for submit@debbugs.gnu.org; Mon, 25 Aug 2014 12:22:38 -0400 Original-Received: from limerock03.mail.cornell.edu ([128.84.13.243]:34475) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XLx2M-0001dG-E1 for 18222@debbugs.gnu.org; Mon, 25 Aug 2014 12:22:31 -0400 X-CornellRouted: This message has been Routed already. Original-Received: from authusersmtp.mail.cornell.edu (granite3.serverfarm.cornell.edu [10.16.197.8]) by limerock03.mail.cornell.edu (8.14.4/8.14.4_cu) with ESMTP id s7PGMO78029601; Mon, 25 Aug 2014 12:22:24 -0400 Original-Received: from [128.84.234.164] (dijon.math.cornell.edu [128.84.234.164]) (authenticated bits=0) by authusersmtp.mail.cornell.edu (8.14.4/8.12.10) with ESMTP id s7PGMMet021225 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT); Mon, 25 Aug 2014 12:22:23 -0400 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 In-Reply-To: <83ppfolj1l.fsf@gnu.org> 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:92665 Archived-At: On 8/25/2014 10:51 AM, Eli Zaretskii wrote: >> Date: Mon, 25 Aug 2014 08:17:49 -0400 >> From: Ken Brown >> CC: peterhull90@gmail.com, 18222@debbugs.gnu.org >> >> On 8/24/2014 10:39 PM, Eli Zaretskii wrote: >>> 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. >> >> The macros on Cygwin don't use any knowledge about Cygwin runtime >> internals. They use knowledge about how gmalloc and unexec work on >> Cygwin. > > Sorry, I meant the knowledge about the internals of sbrk used before > dumping. But I wonder if other platforms can do something similar. For DUMPED, all they have to do is use a variable (like Cygwin's bss_sbrk_did_unexec) that's set to 1 right before dumping and then reset to 0. For ALLOCATED_BEFORE_DUMPING, maybe there's a way to find out the top of the heap at the time of dumping and somehow reinitialize the system malloc at startup to make sure that it only uses later addresses after that? Or the suggestion of Yamamoto might work. Ken