From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Daniel Colascione Newsgroups: gmane.emacs.devel Subject: Re: Preview: portable dumper Date: Wed, 14 Feb 2018 09:49:49 -0800 Message-ID: References: <1775923222.898447.1518559575706@mail.libero.it> <83inb0xkfx.fsf@gnu.org> <87o9krdftc.fsf@gmail.com> <83a7wby1x4.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: blaine.gmane.org 1518630497 13029 195.159.176.226 (14 Feb 2018 17:48:17 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 14 Feb 2018 17:48:17 +0000 (UTC) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0 Cc: emacs-devel@gnu.org To: Eli Zaretskii , Robert Pluim Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Feb 14 18:48:12 2018 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1em19y-0002FN-25 for ged-emacs-devel@m.gmane.org; Wed, 14 Feb 2018 18:47:58 +0100 Original-Received: from localhost ([::1]:44252 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1em1Bz-0005L8-Ua for ged-emacs-devel@m.gmane.org; Wed, 14 Feb 2018 12:50:03 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:48330) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1em1Bt-0005KB-UG for emacs-devel@gnu.org; Wed, 14 Feb 2018 12:49:58 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1em1Bt-0005RH-3H for emacs-devel@gnu.org; Wed, 14 Feb 2018 12:49:58 -0500 Original-Received: from dancol.org ([2600:3c01::f03c:91ff:fedf:adf3]:59666) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1em1Bs-0005On-Om; Wed, 14 Feb 2018 12:49:57 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=dancol.org; s=x; h=Content-Transfer-Encoding:Content-Type:In-Reply-To:MIME-Version:Date:Message-ID:From:References:Cc:To:Subject; bh=nvZswFVkcpVWfOzMsAPLdS5hMAEMmVmWgCILzMO5kuY=; b=bOYXPeuXS4m9iKhss5Nq++oD6vzt/4ZTQ7NTp3ofGfnDDvAELxM4oo6Z++vIcixG8UEAEH6nGCPgae85097OqDHehUiPGgg0cj9t7gsztlsCbSr9i5jBty9Fv779Z2Ivxp/D8kpMHzw5Zvm24V5qVpgTVmYZfMg4CYPoaMobZv1QlzYfqL3DVu/k6vn0tlyFs28og2+shxUb9X2cQ2fulBMA597gGceOMe2xkNAPPistHEr84VOrYwWdxDhK8lxTchd3crQIj7Uul5dCzbq+eRXOzJ/lCSOResp+pGXkFY9FvY4J3T2YKAoB9TlZFMV6I3aQ85U4PPbdusHVIldnMg==; Original-Received: from [2604:4080:1321:8ab0:fce1:8373:845e:a0fb] by dancol.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1em1Br-0002pi-0Z; Wed, 14 Feb 2018 09:49:55 -0800 In-Reply-To: <83a7wby1x4.fsf@gnu.org> Content-Language: en-US X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2600:3c01::f03c:91ff:fedf:adf3 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 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" Xref: news.gmane.org gmane.emacs.devel:222743 Archived-At: On 02/14/2018 08:24 AM, Eli Zaretskii wrote: >> From: Robert Pluim >> Date: Wed, 14 Feb 2018 11:30:07 +0100 >> >>>> What should we look for? >>> >>> The usual stuff, I think: does it build, does it work as expected, >>> etc. >> >> You mean like: > > Yes, like that. > > I see something slightly different on MS-Windows (in a build with > "--enable-checking"), but maybe similar enough to be explained by the > same problem: > > ELC ../lisp/composite.elc > load_dump completed in 46.005 milliseconds > > insdel.c:1937: Emacs fatal error: assertion failed: !pdumper_object_p (BEG_ADDR) > > Backtrace: > > #0 0x762c3227 in KERNELBASE!DebugBreak () > from C:\Windows\syswow64\KernelBase.dll > #1 0x0131940d in emacs_abort () at w32fns.c:10874 > #2 0x01152dea in terminate_due_to_signal (sig=22, backtrace_limit=2147483647) > at emacs.c:388 > #3 0x01206274 in die ( > msg=0x16ce7d2 "!pdumper_object_p (BEG_ADDR)", > file=0x16ce674 "insdel.c", line=1937) > at alloc.c:7789 > #4 0x011acb8b in prepare_to_modify_buffer_1 (start=1, end=1, > preserve_ptr=0x0) at insdel.c:1937 It's weird that we're failing there. If we're looking at a buffer with dumped contents, we set b->text->beg to NULL, then use the normal buffer-allocation procedure (whichever we're compiled to use) to allocate memory for the contents. How can the resulting address ever be equal to what we started with? Neither mmap_realloc nor r_re_alloc nor xrealloc should ever reuse the address.