From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Dumper problems and a possible solutions Date: Wed, 25 Jun 2014 21:36:24 +0300 Message-ID: <83zjh0q1jr.fsf@gnu.org> References: <20140624171955.GS179@brightrain.aerifal.cx> <53AB0EF8.4090608@yandex.ru> <20140625180823.GV179@brightrain.aerifal.cx> <53AB153E.4080905@yandex.ru> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1403721415 28719 80.91.229.3 (25 Jun 2014 18:36:55 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 25 Jun 2014 18:36:55 +0000 (UTC) Cc: dalias@libc.org, emacs-devel@gnu.org To: Dmitry Antipov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Jun 25 20:36:48 2014 Return-path: Envelope-to: ged-emacs-devel@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 1Wzs3r-00068O-CN for ged-emacs-devel@m.gmane.org; Wed, 25 Jun 2014 20:36:47 +0200 Original-Received: from localhost ([::1]:40407 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wzs3q-0000jN-My for ged-emacs-devel@m.gmane.org; Wed, 25 Jun 2014 14:36:46 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:50730) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wzs3h-0000eG-HO for emacs-devel@gnu.org; Wed, 25 Jun 2014 14:36:43 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Wzs3b-0003xW-3H for emacs-devel@gnu.org; Wed, 25 Jun 2014 14:36:37 -0400 Original-Received: from mtaout26.012.net.il ([80.179.55.182]:37675) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wzs3a-0003xC-RW for emacs-devel@gnu.org; Wed, 25 Jun 2014 14:36:31 -0400 Original-Received: from conversion-daemon.mtaout26.012.net.il by mtaout26.012.net.il (HyperSendmail v2007.08) id <0N7Q00D00M5LEM00@mtaout26.012.net.il> for emacs-devel@gnu.org; Wed, 25 Jun 2014 21:32:35 +0300 (IDT) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by mtaout26.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0N7Q004LOM6BX5A0@mtaout26.012.net.il>; Wed, 25 Jun 2014 21:32:35 +0300 (IDT) In-reply-to: <53AB153E.4080905@yandex.ru> X-012-Sender: halo1@inter.net.il X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 80.179.55.182 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:172716 Archived-At: > Date: Wed, 25 Jun 2014 22:30:22 +0400 > From: Dmitry Antipov > Cc: emacs-devel@gnu.org > > On 06/25/2014 10:08 PM, Rich Felker wrote: > > > Are there such objects that need to be preserved across dumping? > > I don't know, and the worst thing is that we can't control over this. > With my debug build, 'ldd src/temacs | wc -l' shows 112 external > libraries. What if just one of these libraries uses malloc() to allocate > an internal object in __attribute__((constructor)) function? If they do, the dumped Emacs will likely crash. Unless these libraries invoke those constructors again when the dumped Emacs comes up, in which case this problem doesn't exist anyway, besides some wasted memory that cannot be used.