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: Sun, 21 Jul 2024 14:11:56 +0000 Message-ID: References: <8634o3c98h.fsf@gnu.org> <861q3nc5j7.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="b1_NvjSI2Qz0kBBlE1ETktdbDb49FE9IcKM0i54AcBL8xw" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="37724"; 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 Sun Jul 21 16:19:45 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 1sVXPd-0009ev-B9 for ged-emacs-devel@m.gmane-mx.org; Sun, 21 Jul 2024 16:19:45 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sVXPK-0002I9-LP; Sun, 21 Jul 2024 10:19:26 -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 1sVXIF-0008Eo-Lj for emacs-devel@gnu.org; Sun, 21 Jul 2024 10:12:07 -0400 Original-Received: from mail-40133.protonmail.ch ([185.70.40.133]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sVXID-0001pX-MM; Sun, 21 Jul 2024 10:12:07 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail3; t=1721571120; x=1721830320; bh=gqtHkBNdAf0cVcusNGUZ9A5gON+rnA0UG7P/LFikKVE=; 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=HjkdVB5fpo7d2EZgMSQ6zmTVNGLEsZMZ8QuvXKYjI2l7nmGMYo2WNTyHFhcQXQmtL 4PpUyHxujGpiqmaDqjod0xyJ9eG84xOOMNwz/4RQVGO/uji+7qN+gZvt+KcaliRKmj RaQ9db4cAiiR9CpMZ1i5KE/Eww3ozXqjhyH7DbAIVl+Akw4dPf860V5aghpAJ2b7c7 4x9jnBXTsjbzDwcT1mRMBNIADPIUbJDws+8fkupmzxtcmFKuBpOdZZ7FD3xBVlxt8t hX8PWTWh2KLJ4rOe1D6UEs5H1uvBB+xEt6gJF2zx3bX6cdOt5j78OQ8s1na8ShWVHI UlvqJlqGwLOxg== In-Reply-To: <861q3nc5j7.fsf@gnu.org> Feedback-ID: 112775352:user:proton X-Pm-Message-ID: 4d226d73359cbba064c26ac85a2f592d3bf84db8 Received-SPF: pass client-ip=185.70.40.133; envelope-from=pipcet@protonmail.com; helo=mail-40133.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.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Sun, 21 Jul 2024 10:19:13 -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:321883 Archived-At: This is a multi-part message in MIME format. --b1_NvjSI2Qz0kBBlE1ETktdbDb49FE9IcKM0i54AcBL8xw Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On Sunday, July 21st, 2024 at 12:07, Eli Zaretskii wrote: > > Date: Sun, 21 Jul 2024 11:42:41 +0000 >=20 > > From: Pip Cet pipcet@protonmail.com > > Cc: emacs-devel@gnu.org > >=20 > > > Error: error ("Memory exhausted--use M-x save-some-buffers then exit = and restart Emacs") > > > dump-emacs-portable("d:/gnu/git/emacs/feature/src/bootstrap-emacs.pdm= p") > > >=20 > > > The last commit that did build was 55670e0. > >=20 > > Thanks for letting me know! It builds here on 32-bit and 64-bit GNU/Lin= ux systems, so it's possible this is a Windows issue... >=20 > Maybe, maybe not. I see nothing specific to Windows yet. If it is what I think it is, I'm surprised I haven't seen it in my tests, a= s it's not specific to Windows at all. > > > The backtrace from the call to memory_full is below. The reason seems > > > to be the recent changes in igc_dump_finish_obj: the result is that > > > dump_igc_finish_obj wants to write a preposterously large amount of > > > zeros into the dump: 744MB in the backtrace below, but I've seen much > > > larger numbers there, like 1.2GB(!). This causes dump_grow_buffer > > > requests 2GB from the OS, which rightfully fails. > >=20 > > That all points to an object with a broken MPS header (or none). The qu= estion is what kind of object. > >=20 > > > #8 dump_float (lfloat=3D, ctx=3D) at pd= umper.c:2381 > > >=20 > > > #9 dump_object (ctx=3D0x724eb38, ctx@entry=3D0x724eb3c, object=3DXIL(= 0xcbf005)) > > > at pdumper.c:3306 > >=20 > > This section puzzles me. If object is a vectorlike (the type bits of 0x= cbf005 are 5, so it should be), it should be dumped as a vectorlike, not a = float. >=20 > Does the below help? >=20 > #4 dump_write (ctx=3D0x71ceb38, buf=3D0x71ce848, nbyte=3D8) at pdumper.c:= 792 > 792 dump_write (struct dump_context *ctx, const void *buf, dump_off nbyte= ) > (gdb) p ctx->igc_obj_dumped >=20 > $1 =3D (void *) 0xc3f000 Thanks, that helps a lot! It's an internal subr, and those don't store thei= r 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 he= lps, but it probably breaks GC in the !HAVE_MPS case. > > (Also, ctx@entry shouldn't be different from ctx, should it?) >=20 > I think this is just GDB trying (and failing) to understand the > complexity of GCC's allocation of the place to hold the value: That makes sense, yes. Thanks again Pip --b1_NvjSI2Qz0kBBlE1ETktdbDb49FE9IcKM0i54AcBL8xw Content-Type: text/x-patch; name=0001-mps-subr.patch Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename=0001-mps-subr.patch ZGlmZiAtLWdpdCBhL3NyYy9saXNwLmggYi9zcmMvbGlzcC5oCmluZGV4IDViNTU1YzYyMzA0Li4x ZWFiOGFiZDA3YiAxMDA2NDQKLS0tIGEvc3JjL2xpc3AuaAorKysgYi9zcmMvbGlzcC5oCkBAIC0z Njk5LDcgKzM2OTksNyBAQCBDSEVDS19TVUJSIChMaXNwX09iamVjdCB4KQogI2RlZmluZSBERUZV TihsbmFtZSwgZm5uYW1lLCBzbmFtZSwgbWluYXJncywgbWF4YXJncywgaW50c3BlYywgZG9jKQlc CiAgIFNVQlJfU0VDVElPTl9BVFRSSUJVVEUJCQkJCQlcCiAgIHN0YXRpYyB1bmlvbiBBbGlnbmVk X0xpc3BfU3ViciBzbmFtZSA9CQkJCVwKLSAgICB7IHsJeyBHQ19IRUFERVJfSU5JVCBQVkVDX1NV QlIgPDwgUFNFVURPVkVDVE9SX0FSRUFfQklUUyB9LAlcCisgICAgeyB7CXsgR0NfSEVBREVSX0lO SVQgUFZFQ0hFQURFUlNJWkUgKFBWRUNfU1VCUiwgc2l6ZW9mICh1bmlvbiBBbGlnbmVkX0xpc3Bf U3VicikgLyB3b3JkX3NpemUsIDApIH0sIFwKICAgICAgICAgeyAuYSAjIyBtYXhhcmdzID0gZm5u YW1lIH0sCQkJCQlcCiAJbWluYXJncywgbWF4YXJncywgbG5hbWUsIHtpbnRzcGVjfSwgbGlzcF9o X1FuaWx9fTsJCVwKICAgIExpc3BfT2JqZWN0IGZubmFtZQo= --b1_NvjSI2Qz0kBBlE1ETktdbDb49FE9IcKM0i54AcBL8xw--