From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Andrea Corallo Newsgroups: gmane.emacs.devel Subject: Re: MPS: assertion failed: header_type (h) != IGC_OBJ_FWD Date: Thu, 18 Jul 2024 15:06:38 -0400 Message-ID: References: <86zfqhh2xv.fsf@gnu.org> <87msmhwhal.fsf@gmail.com> 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="3059"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: Helmut Eller , Eli Zaretskii , Paul Eggert , pipcet@protonmail.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 Thu Jul 18 21:07:08 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 1sUWT5-0000aV-Ai for ged-emacs-devel@m.gmane-mx.org; Thu, 18 Jul 2024 21:07:07 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sUWSg-0000v1-8b; Thu, 18 Jul 2024 15:06:42 -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 1sUWSe-0000un-Tz for emacs-devel@gnu.org; Thu, 18 Jul 2024 15:06:41 -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 1sUWSd-0002wR-QW; Thu, 18 Jul 2024 15:06:39 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:Date:References:In-Reply-To:Subject:To: From; bh=nssQ84v2g72H9+kYbuT0koVXO/nS5O8A5fgXHRkF21s=; b=P99SpbJplOL7kMCJFA93 d2kO4BOuwKT6Car7KOU4JVU72H+WeaZkkqmkLouPb2lgtQXPxl9XzdYRF4p4iRo0oHJaNydP+ChF9 GDyuB9lZ9qeU/iZPA7CJ6cIqJBNos/APvjifGsGBuePJQj9jhpQ0AkOLAuvIbGZwSO0jejzW5HAL9 jz2lsmrDree7fM3UJ6qINMyNUf6OiRYNmu5B/oNjsW0EymsPgjkQ9R3XEPfFvrdP7zXT7p4ZlSbbT Bw6C3ilKnWSrtS9xYmv4muQc9uEtS3L4qIuZrbyxY/+KFqqyww+az+4+QRMQrVcGXP9IgM+NS5rBm NCgSze92dN9U0Q==; Original-Received: from acorallo by fencepost.gnu.org with local (Exim 4.90_1) (envelope-from ) id 1sUWSc-0000nC-TS; Thu, 18 Jul 2024 15:06:39 -0400 In-Reply-To: ("Gerd =?utf-8?Q?M=C3=B6llman?= =?utf-8?Q?n=22's?= message of "Thu, 18 Jul 2024 17:08:36 +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:321807 Archived-At: Gerd M=C3=B6llmann writes: > Gerd M=C3=B6llmann writes: > >> Gerd M=C3=B6llmann writes: >> >>> Let's see if it continues crashing. >> >> It does :-(. > > Next idea. > > I wonder if __builtin_unwind_init changes things. The different > behaviour when compiled -O0 and -O, the fact that problems happen in > "random" places which lets me suspect indicates a basic problem, and so > on - that would fit, when MPS doesn't see something in a register. > Maybe. > > I'm now running with a patch that adds that to MPS' stack scanning code. > > @@ -39,6 +39,8 @@ void StackHot(void **stackOut); > /* STACK_CONTEXT_BEGIN -- save context */ >=20=20 > #define STACK_CONTEXT_BEGIN(arena) \ > + BEGIN \ > + __builtin_unwind_init(); \ > BEGIN \ > StackContextStruct _sc; \ > STACK_CONTEXT_SAVE(&_sc); \ > @@ -51,6 +53,7 @@ void StackHot(void **stackOut); > /* STACK_CONTEXT_END -- clear context */ >=20=20 > #define STACK_CONTEXT_END(arena) \ > + END; \ > END; \ > AVER(arena->stackWarm !=3D NULL); \ > arena->stackWarm =3D NULL; \ > > If somone observes similar strange phenomena like I do on macOS/arm64, > maybe also give it a try. > > Let's see how long igc survives this time :-). Hi Gerd, if you want to use '__builtin_unwind_init' be aware that this GCC bug I've found sometime ago [1] might make the builtin ineffective. It might not effect your generated code but in case you need you can see how we work it around in 'flush_stack_call_func'. Regards Andrea [1]