[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: MPS: unable to build due to assertion violation in igc_dump_check_ob
From: |
Gerd Möllmann |
Subject: |
Re: MPS: unable to build due to assertion violation in igc_dump_check_object_starts |
Date: |
Tue, 23 Jul 2024 20:59:52 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) |
Eli Zaretskii <eliz@gnu.org> writes:
>> From: Gerd Möllmann <gerd.moellmann@gmail.com>
>> 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.
I can't explain that ATM. The start function
static void
dump_igc_start_obj (struct dump_context *ctx, enum igc_obj_type type,
const void *in)
{
eassert (ctx->igc_type == IGC_OBJ_INVALID);
eassert (ctx->igc_obj_dumped == NULL);
eassert (ctx->offset % DUMP_ALIGNMENT == 0);
ctx->igc_obj_dumped = (void *) in;
ctx->igc_type = type;
ctx->igc_base_offset = ctx->offset;
if (ctx->flags.dump_object_contents &&
(type == IGC_OBJ_DUMPED_BYTES ||
type == IGC_OBJ_DUMPED_CODE_SPACE_MASKS))
{
/* This saving of obj_offset is Because of an assertion in
dump_write. */
dump_off obj_offset = ctx->obj_offset;
ctx->obj_offset = 0;
dump_write_zero (ctx, igc_header_size ());
ctx->obj_offset = obj_offset;
}
}
doesn't write the type, unless I'm blind, and the finish function
doesn't either before the emacs_abort. Hm.
- Re: MPS: unable to build due to assertion violation in igc_dump_check_object_starts, (continued)
- Re: MPS: unable to build due to assertion violation in igc_dump_check_object_starts, Helmut Eller, 2024/07/24
- Re: MPS: unable to build due to assertion violation in igc_dump_check_object_starts, Pip Cet, 2024/07/24
- Re: MPS: unable to build due to assertion violation in igc_dump_check_object_starts, Helmut Eller, 2024/07/24
- Re: MPS: unable to build due to assertion violation in igc_dump_check_object_starts, Pip Cet, 2024/07/24
- Re: MPS: unable to build due to assertion violation in igc_dump_check_object_starts, Helmut Eller, 2024/07/24
- Re: MPS: unable to build due to assertion violation in igc_dump_check_object_starts, Pip Cet, 2024/07/24
- Re: MPS: unable to build due to assertion violation in igc_dump_check_object_starts, Eli Zaretskii, 2024/07/24
- Re: MPS: unable to build due to assertion violation in igc_dump_check_object_starts, Gerd Möllmann, 2024/07/23
- Re: MPS: unable to build due to assertion violation in igc_dump_check_object_starts, Gerd Möllmann, 2024/07/23
- Re: MPS: unable to build due to assertion violation in igc_dump_check_object_starts, Eli Zaretskii, 2024/07/23
- Re: MPS: unable to build due to assertion violation in igc_dump_check_object_starts,
Gerd Möllmann <=
- Re: MPS: unable to build due to assertion violation in igc_dump_check_object_starts, Pip Cet, 2024/07/23
Re: MPS: unable to build due to assertion violation in igc_dump_check_object_starts, Pip Cet, 2024/07/23