[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: MPS: assertion failed: header_type (h) != IGC_OBJ_FWD
From: |
Andrea Corallo |
Subject: |
Re: MPS: assertion failed: header_type (h) != IGC_OBJ_FWD |
Date: |
Thu, 18 Jul 2024 15:06:38 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) |
Gerd Möllmann <gerd.moellmann@gmail.com> writes:
> Gerd Möllmann <gerd.moellmann@gmail.com> writes:
>
>> Gerd Möllmann <gerd.moellmann@gmail.com> 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 */
>
> #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 */
>
> #define STACK_CONTEXT_END(arena) \
> + END; \
> END; \
> AVER(arena->stackWarm != NULL); \
> arena->stackWarm = 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] <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115132>
- Re: MPS: assertion failed: header_type (h) != IGC_OBJ_FWD, (continued)
- Re: MPS: assertion failed: header_type (h) != IGC_OBJ_FWD, Helmut Eller, 2024/07/16
- Re: MPS: assertion failed: header_type (h) != IGC_OBJ_FWD, Gerd Möllmann, 2024/07/16
- Re: MPS: assertion failed: header_type (h) != IGC_OBJ_FWD, Eli Zaretskii, 2024/07/16
- Re: MPS: assertion failed: header_type (h) != IGC_OBJ_FWD, Pip Cet, 2024/07/16
- Re: MPS: assertion failed: header_type (h) != IGC_OBJ_FWD, Gerd Möllmann, 2024/07/16
- Re: MPS: assertion failed: header_type (h) != IGC_OBJ_FWD, Andrea Corallo, 2024/07/17
- Re: MPS: assertion failed: header_type (h) != IGC_OBJ_FWD, Gerd Möllmann, 2024/07/17
- Re: MPS: assertion failed: header_type (h) != IGC_OBJ_FWD, Gerd Möllmann, 2024/07/18
- Re: MPS: assertion failed: header_type (h) != IGC_OBJ_FWD, Pip Cet, 2024/07/18
- Re: MPS: assertion failed: header_type (h) != IGC_OBJ_FWD, Gerd Möllmann, 2024/07/18
- Re: MPS: assertion failed: header_type (h) != IGC_OBJ_FWD,
Andrea Corallo <=
- Re: MPS: assertion failed: header_type (h) != IGC_OBJ_FWD, Gerd Möllmann, 2024/07/18
- Re: MPS: assertion failed: header_type (h) != IGC_OBJ_FWD, Gerd Möllmann, 2024/07/19
- Re: MPS: assertion failed: header_type (h) != IGC_OBJ_FWD, Pip Cet, 2024/07/22
- Re: MPS: assertion failed: header_type (h) != IGC_OBJ_FWD, Gerd Möllmann, 2024/07/22
- Re: MPS: assertion failed: header_type (h) != IGC_OBJ_FWD, Paul Eggert, 2024/07/16