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: scratch/igc 90e80a9a53e 6/6: Adjust igc.c code to header changes Date: Sun, 21 Jul 2024 17:25:19 +0300 Message-ID: <86zfqabz5c.fsf@gnu.org> References: <8634o3c98h.fsf@gnu.org> <861q3nc5j7.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="20394"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: Pip Cet Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun Jul 21 16:25:50 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 1sVXVW-00059J-9x for ged-emacs-devel@m.gmane-mx.org; Sun, 21 Jul 2024 16:25:50 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sVXV6-0003x8-H6; Sun, 21 Jul 2024 10:25:24 -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 1sVXV4-0003we-Ot for emacs-devel@gnu.org; Sun, 21 Jul 2024 10:25:22 -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 1sVXV4-0004Ta-Bj; Sun, 21 Jul 2024 10:25:22 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=kmhBieOy/7yjSCuNtuBOvDBl74aN2b0TIZNWASLqmiA=; b=rGZkrluPs+eL cmQYn+MLxyKq6Fn8+QdBZRqXSUXHjmbNlz+lLQpSZNyCcAPDK/RXHhzBgnNn5Z9Tuz0LJC3jgbFO3 I+9oiEEhnQnt9+lBbd3y/Eybk96pugkxaoCdNXlGmMXr+iUenbqlG6zyYu0AdgdVjhe/BboEW4J8C nDntL0U1Y2WJmClmTSqqsCW96X0RG2ZShpka9dhIHpWW6VzZz0+BRzpUODk7qzX/mgQTMfkBccFXs 1Hu5MIQVEv8dcgn+xWIC3OUeOSg2JI79ta+qAaZBWnj+xAxTZZDCSIjpFgTtK2qE10cXDCEkXrgfE 6xb/xGFr0PjUGh49rC/trw==; In-Reply-To: (message from Pip Cet on Sun, 21 Jul 2024 14:11:56 +0000) 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:321884 Archived-At: > Date: Sun, 21 Jul 2024 14:11:56 +0000 > From: Pip Cet > Cc: emacs-devel@gnu.org > > > Does the below help? > > > > #4 dump_write (ctx=0x71ceb38, buf=0x71ce848, nbyte=8) at pdumper.c:792 > > 792 dump_write (struct dump_context *ctx, const void *buf, dump_off nbyte) > > (gdb) p ctx->igc_obj_dumped > > > > $1 = (void *) 0xc3f000 > > Thanks, that helps a lot! It's an internal subr, and those don't store their proper size in the pseudovector header, so we don't dump them properly as we trust the pseudovector header. > > I've managed to reproduce something similar here, and the attached patch helps, but it probably breaks GC in the !HAVE_MPS case. Why cannot you identify this kind of object during dumping, and avoid applying whatever igc_dump_finish_obj does? There's the PVEC_SUBR in the struct, no?