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: unable to build due to assertion violation in igc_dump_check_object_starts Date: Tue, 23 Jul 2024 21:49:58 +0300 Message-ID: <86ed7k7xk9.fsf@gnu.org> References: <861q3k9sfb.fsf@gnu.org> <86zfq889re.fsf@gnu.org> <86y15s893y.fsf@gnu.org> <86ttgg867k.fsf@gnu.org> <86ikww7zvf.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="3362"; mail-complaints-to="usenet@ciao.gmane.io" Cc: pipcet@protonmail.com, eller.helmut@gmail.com, 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 Tue Jul 23 20:50: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 1sWKae-0000hm-Lg for ged-emacs-devel@m.gmane-mx.org; Tue, 23 Jul 2024 20:50:24 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sWKaM-0002t2-6y; Tue, 23 Jul 2024 14:50:06 -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 1sWKaH-0002sJ-CN for emacs-devel@gnu.org; Tue, 23 Jul 2024 14:50:02 -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 1sWKaH-00008Y-0J; Tue, 23 Jul 2024 14:50:01 -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=k1d23NSyP4XW8lLMo3xtA1JM8kMZarJEXILYYIKA41s=; b=EFynK6GjgstghZn9EPgG 6KnY2YULLVFdjvIGXfGOY7tI2Bem6u+82bBUTVEgq5A/2uEF6IMdWyWPX6Cr4+0n79Hqf2jhNIAGa S83Uvs7lHs1WAPQyVwqIT1sN3Zz/kzpY/0MZx0jjM+27D5qJv3jhb8OrrCHVT64egZeetXh90Kkhv wMk4uwwpl4p3XlbJ2CMM6z5kiUe3wCxhm4Alpfb5/PtIKAdLxxXwPKDugcECSh3mKfEJgEvsX8mXy vyzxADE/gj4rBUn6idK7OZ7vc48pMpsCxGz/vGdQ0e/n9/oITVqUT1XR4O6io/WzhHgs72X9Cz7dT 8vA3N4pMgauu8A==; In-Reply-To: (message from Gerd =?utf-8?Q?M=C3=B6llmann?= on Tue, 23 Jul 2024 20:42:56 +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:322011 Archived-At: > From: Gerd Möllmann > Cc: pipcet@protonmail.com, eller.helmut@gmail.com, emacs-devel@gnu.org > Date: Tue, 23 Jul 2024 20:42:56 +0200 > > We are inside of the dump_igc_finish_obj. I see nothing immediately > suspicious there, hm. > > Can you try to look at that header? It is at offset ctx->igc_base_offset > from ctx->buf. Something like > > p header_type ((char *) ctx->buf + ctx->igc_base_offset) > > Is it already broken? Depending on where exactly you emacs_abort it > either should still be zeroed or contain something valid like type > IGC_OBJ_STRING_DATA. I added emacs_abort here: if (ctx->flags.dump_object_contents) { char *base = (char *) ctx->buf + ctx->igc_base_offset; char *end = (char *) ctx->buf + ctx->offset; if (ctx->igc_base_offset == 0x6e6c08) emacs_abort (); <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< eassert (end > base); char *should_end = igc_dump_finish_obj (ctx->igc_obj_dumped, ctx->igc_type, base, end); eassert (should_end >= end); dump_write_zero (ctx, should_end - end); if (ctx->flags.record_object_starts) dump_push (&ctx->igc_object_starts, list2 (dump_off_to_lisp (ctx->igc_base_offset), dump_off_to_lisp (ctx->offset))); } And: (gdb) p header_type ((char *) ctx->buf + ctx->igc_base_offset) $10 = IGC_OBJ_STRING_DATA This is _before_ igc_dump_finish_obj was called.