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 11:26:37 -0800 Message-ID: <08ac43fb-0b13-8a51-4571-11a21b8ffbdc@dancol.org> References: <1775923222.898447.1518559575706@mail.libero.it> <83inb0xkfx.fsf@gnu.org> <87o9krdftc.fsf@gmail.com> <83a7wby1x4.fsf@gnu.org> <83r2pnwftj.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 1518636566 19619 195.159.176.226 (14 Feb 2018 19:29:26 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 14 Feb 2018 19:29:26 +0000 (UTC) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0 Cc: rpluim@gmail.com, emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Feb 14 20:29:22 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 1em2jw-0004Gd-QA for ged-emacs-devel@m.gmane.org; Wed, 14 Feb 2018 20:29:13 +0100 Original-Received: from localhost ([::1]:52051 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1em2ly-0001ws-M6 for ged-emacs-devel@m.gmane.org; Wed, 14 Feb 2018 14:31:18 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:48818) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1em2hZ-0006sA-Pg for emacs-devel@gnu.org; Wed, 14 Feb 2018 14:26:46 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1em2hZ-0002He-2L for emacs-devel@gnu.org; Wed, 14 Feb 2018 14:26:45 -0500 Original-Received: from dancol.org ([2600:3c01::f03c:91ff:fedf:adf3]:32774) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1em2hY-0002GR-OX; Wed, 14 Feb 2018 14:26:44 -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=ypXu09g9B2TqsVldSyL+XfBTPSYtZcxhmulqYiikUtg=; b=oqZMLpn19j92Cm3dC7Fx14U1HgHum1iQFgL7jLzC7sjmaaQQ/t5J6EbdeA7X2Ty02GMGuVaeDKhdX4aCbRP7ruiiwIKKvuYLMzHNMvj+EGQ/ZLtGSTxmBfvfwOVfEGjrTPcWnHJhYg4yfyH/869dBdb4qhAX9r6OByd1m4mD8fJLvFzgdMtgpe3FtG13oZOElN9tBm73wD7z6h3DS/gUWmsbC3QKAYojTb2MWP01/+8YM0dQmu2+LGR40hJ22EAIM/nlzQUUK5dXoIbe4GXi9M3hVDMEqFPzxFQ+zNmnkKN1nAy9nhL6HvpFJHEVBrZGkUmMk/f5gTQn78Gx5rz8zQ==; Original-Received: from [2604:4080:1321:8ab0:a043:78ef:8645:e3ee] by dancol.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1em2hX-0003Ez-IF; Wed, 14 Feb 2018 11:26:43 -0800 In-Reply-To: <83r2pnwftj.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:222747 Archived-At: On 02/14/2018 11:07 AM, Eli Zaretskii wrote: >> Cc: emacs-devel@gnu.org >> From: Daniel Colascione >> Date: Wed, 14 Feb 2018 09:49:49 -0800 >> >>> #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. > > You are talking about what enlarge_buffer_text does? IOW, this: It should be fixed now. Give it a shot.