From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Pip Cet Newsgroups: gmane.emacs.devel Subject: Re: scratch/igc 90e80a9a53e 6/6: Adjust igc.c code to header changes Date: Mon, 22 Jul 2024 14:35:23 +0000 Message-ID: References: <8634o3c98h.fsf@gnu.org> <861q3nc5j7.fsf@gnu.org> <86zfqabz5c.fsf@gnu.org> <5p8jkXALtW4p4ny5SDaTELHeMcDhmaymtiNVusLIQJBqUE9Vpsbyp4Bg_bc19PgWGxP5U3iBgVDnZeYptqz4BrBTcuZgmSwVq_PMiY1Evzg=@protonmail.com> <86cyn6bti1.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="9323"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Jul 22 17:01:25 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 1sVuXU-0002DW-S6 for ged-emacs-devel@m.gmane-mx.org; Mon, 22 Jul 2024 17:01:24 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sVuWt-0003LC-2Z; Mon, 22 Jul 2024 11:00:47 -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 1sVu8g-0000IP-Kl for emacs-devel@gnu.org; Mon, 22 Jul 2024 10:35:46 -0400 Original-Received: from mail-4316.protonmail.ch ([185.70.43.16]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sVu8a-0006Xr-Nu for emacs-devel@gnu.org; Mon, 22 Jul 2024 10:35:46 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail3; t=1721658935; x=1721918135; bh=MlUfXREC/tc/v+E3TcJkUvvxgwolIrfLqIf9Ti201Z4=; h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References: Feedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID: Message-ID:BIMI-Selector; b=bv5q9ooF5VtMbRNNs/MK8fhUadbIHmt2qdzJMDTQ8W2Iyhh2wi+SKB4OY07K1RHRp UcRHqERk8DXo4737bWWNuYeScgZxUxf6vrc/7Q/m65RKjAZzt6JbloQpEfAncmV2Cw qNChdJ7FDVd0b643LiwxCMx5gdv+/YKgG2ugm12WpQmLVlG8ySZc8Tm3NB8IwGRYAG HGtOt85w99Fur2ccYFCYdIzp5ZMzJbOu3lNXKxDmMKm+tUsuS+Ieu8XJfeonNdxZDu zthJbl2TFQmLHlVQiGzlGUNQ3PgZJQp0uz3AGLcxZsr0I1TNiG5G1SPjczO4RoraO5 jbyUVHEMA2Qbg== In-Reply-To: <86cyn6bti1.fsf@gnu.org> Feedback-ID: 112775352:user:proton X-Pm-Message-ID: e626c76622b6b1d9336fd8a7945e60b001867e00 Received-SPF: pass client-ip=185.70.43.16; envelope-from=pipcet@protonmail.com; helo=mail-4316.protonmail.ch X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Mon, 22 Jul 2024 11:00:45 -0400 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:321947 Archived-At: On Sunday, July 21st, 2024 at 16:27, Eli Zaretskii wrote: > > Date: Sun, 21 Jul 2024 16:20:57 +0000 >=20 > > From: Pip Cet pipcet@protonmail.com > > Cc: emacs-devel@gnu.org > >=20 > > > Why cannot you identify this kind of object during dumping, and avoid > > > applying whatever igc_dump_finish_obj does? > >=20 > > You mean you'd prefer to leave the pseudovector header for builtin subr= s at its current value? We can do that, but I think the MPS header should s= till be valid. (It's not with the patch I had attached: that makes it claim= an object size of 112 bytes when it's actually just 96 bytes, and that cau= ses us to overwrite the first 16 bytes after the last subr; in my case, std= out... Anyway, next patch attached, which duplicates a bit of code unnecess= arily.) >=20 >=20 > Then why doesn't your patch do that? I don't understand why it should. The pseudovector headers of main_thread a= nd the subroutines are, currently, simply wrong: (gdb) p vectorlike_nbytes(&Scall_interactively) $1 =3D 2415919112 (gdb) p vectorlike_nbytes(&main_thread) $2 =3D 584 (gdb) p sizeof(main_thread) $3 =3D 520 (gdb) p sizeof(Scall_interactively) $4 =3D 88 > And this new patch is even more massive than the previous one? It is "even more massive" than a one-liner because there were additional bu= gs to fix, yes. As demonstrated above, vectorlike_nbytes doesn't work on su= broutines because they lack the pseudovector flag, so I had to duplicate so= me code from alloc.c to use pseudovector_nbytes instead. =20 > In any case, if we need to change the definition of Aligned_Lisp_Subr, > let's do that only "#if HAVE_MPS", and leave the old code intact. No objections there. I've found two more bugs that popped up testing this in various configurati= ons: not protecting Vinternal_interpreter_environment (fun to debug, as mig= ht be imagined) and using xfree rather than igc_xfree in sort.c. Both may h= ave affected dumping, so I'll push all three fixes and then hopefully thing= s will work again. Pip