[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 18:29:56 +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 16:52:42 +0200
>>
>> Could you do
>>
>> p header_type(start)
>>
>> please, that should show the IGC_OBJ_xy type of the offending header
>>
>> p header_nwords(start)
>>
>> is the, presumably wrong, size in words, but I think we have already
>> seen it's too large.
>
> Compliance!
>
> (gdb) p header_type(start)
> $7 = 58
> (gdb) p (enum igc_obj_type)header_type(start)
> $8 = 58
> (gdb) p IGC_OBJ_NUM_TYPES+0
> $9 = 31
> (gdb) p header_nwords(start)
> $10 = 200437507
So the igc_header is completely kaputt.
But we can try to use the value of start_off at the time the assertion
is triggered. The list containing the start/end offsets should be
created here:
static void
dump_igc_finish_obj (struct dump_context *ctx)
{
if (ctx->flags.dump_object_contents)
{
char *base = (char *) ctx->buf + ctx->igc_base_offset;
char *end = (char *) ctx->buf + ctx->offset;
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)));
Here ^^^^^^
}
ctx->igc_obj_dumped = NULL;
ctx->igc_type = IGC_OBJ_INVALID;
ctx->igc_base_offset = -1;
}
# endif // HAVE_MPS
If I'm not completely mistaken, start_off when asserting should ==
ctx->igc_base_offset at some point whle dumping. Could you perhaps put a
conditional breakpoint there? We could then go up the stack and see
which dump_xy function that is.
Maybe a short overview what's happening here, as an orientation. In
pdumper object dumping happens by first calling dump_start_object, then
dumping the fields or whatever that object contains, and finally calling
dump_finish_object. For MPS, dump_start_object writes an empty
igc_header, and dump_finish_object fills out the igc_header, since we
then know the size of the object and so on. It also records the object
start/end in ctx->igc_object_starts, which is sort of a remnant from the
itmes that the dump was a root, and not in MPS. But the object starts
are apparently still helpful.
- 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, 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, Eli Zaretskii, 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, Eli Zaretskii, 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, Pip Cet, 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, Pip Cet, 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, Gerd Möllmann, 2024/07/23
- 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, 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/24