From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: MPS codegen Date: Fri, 14 Jun 2024 17:33:25 +0300 Message-ID: <865xuby4p6.fsf@gnu.org> References: <87le3b43qi.fsf@gmail.com> <86r0d21tqj.fsf@gnu.org> <877cetgqiz.fsf_-_@gmail.com> <87wmmsg2e4.fsf@gmail.com> <878qz8ezn4.fsf@gmail.com> <8734pfgb51.fsf@gmail.com> <86ikybyd2h.fsf@gnu.org> <86bk43y8tr.fsf@gnu.org> <868qz7y6vj.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="2332"; mail-complaints-to="usenet@ciao.gmane.io" Cc: eller.helmut@gmail.com, acorallo@gnu.org, emacs-devel@gnu.org To: Gerd =?utf-8?Q?M=C3=B6llmann?= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri Jun 14 16:34:15 2024 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1sI80N-0000KI-Fw for ged-emacs-devel@m.gmane-mx.org; Fri, 14 Jun 2024 16:34:15 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sI7ze-0001vd-NS; Fri, 14 Jun 2024 10:33:30 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sI7zc-0001ul-Rb for emacs-devel@gnu.org; Fri, 14 Jun 2024 10:33:28 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sI7zc-00075A-Ge; Fri, 14 Jun 2024 10:33:28 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=yfvIq91c13/oSB7Wxm3BVYXvST/oi8F0NPQBDKtw60M=; b=rdzJ0mQOjDx+LEVYt42A jMFoLINjc+UdHgaRRnQ6PDIwZ+nOVRO+uFATNCjQ3Y5nn7MBWfPtxgCsUIDLvFcVCXhxPgpQUIXVy PfWy3VtwKnDMd11Yd+LxuLlfIz4UeUoCp2WMK0swgCln/G5ElxNqDxgYcTt2PV7ruVIfnIOdU66qr oNI6+Q6y8aPZOF++FpvQATcQS+jnFSIzYfyWtYhn4Ub1+7PV+zuH38imAsv9RH5YYfxwldIZJ6tnr zNb+xVdhKPF4v1k97HUzQrnjI0IwU/sYAfqJZxjur5SbqXEdI7QbZZsiE4pufc0jjeeXRg2yIZdf5 9BGOSz4bRRWsww==; In-Reply-To: (message from Gerd =?utf-8?Q?M=C3=B6llmann?= on Fri, 14 Jun 2024 16:05:03 +0200) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 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-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:320075 Archived-At: > From: Gerd Möllmann > Cc: eller.helmut@gmail.com, acorallo@gnu.org, emacs-devel@gnu.org > Date: Fri, 14 Jun 2024 16:05:03 +0200 > > Eli Zaretskii writes: > > >> What I was trying to convey is kust that in this case mirror_fwd is used. > > > > Is or should be? > > Is. > > > I see mirror_fwd used only in igc.c, and it's a static function there. > > > > I guess what I'm saying is that I don't understand what you suggest to > > do or check to try to fix these segfaults. > > One big difference to before is that the object graph in the loaded dump > is copied top MPS (see igc_on_pdump_loaded). > > This proceeds in steps. > > 1. iterate over objects in the dump and copy them. Record for each > object in dump what its copy is (igc_mirror::dump_to_mps). > > 2. iterate over objects in the copy, and "mirror" references, i.e. > replace references to the old graph with references in the copy. > Here, mirror_fwd comes into play, as subroutine of mirror_symbol. > > 3. Fix roots in a similar way. > > 4. Discard the dump. > > I'd probably put a breakpoitn in mirror_fwd and look around if something > there is not right for IA32, or Windows, don't know. Thanks. But this kind of journey down the rabbit hole (mirror_fwd leads to IGC_MIRROR_OBJ, which leads to mirror_lisp_obj, which leads to look up_copy and a bunch of other functions whose functionality is not documented anywhere) will have to wait for someone else. Sorry, I have too much on my plate at this time: need to start the Emacs 30 release cycle. I can only say that I tried to bisect your changes installed today, and failed: almost all of the commits between 219f7d5 (the last one which builds and works) and HEAD don't even compile due to compilation errors (undeclared variables, missing functions, etc.), and those which do compile crash when Emacs attempts to byte-compile some Lisp. My guess is that something very basic in dumping and/or loading from the pdumper file became broken, but due to the above I cannot pinpoint the commit which broke it. Sorry. I'll happily test any change you or Helmut or anyone else suggests.