Subject: bug#76237: 31.0.50; feature/igc: crash #1, 2025-02-12

From: Oliver Reiter <[email-masked]>
Date: Fri, 14 Feb 2025 09:57:44 +0100

Pip Cet <[email-masked]> writes:

> "Oliver Reiter" <[email-masked]> writes:
>
>> Pip Cet <[email-masked]> writes:
>>
>>> "Oliver Reiter" <[email-masked]> writes:
>>>
>>>> Pip Cet <[email-masked]> writes:
>>>>
>>>>> (gdb) p main_thread.s.bc
>>>>>
>>>>> then
>>>>>
>>>>> (gdb) p bc_next_frame (main_thread.s.bc.fp)
>>>>>
>>>>
>>>> (gdb) p main_thread.s.bc
>>>> $1 = {fp = 0x7fffdf3ff710, stack = 0x7fffdf3ff010 "", stack_end = 0x7fffdf7ff010 ""}
>>>> (gdb) p bc_next_frame (main_thread.s.bc.fp)
>>>> You can't do that without a process to debug.
>>>
>>> (gdb) p main_thread.s.bc.fp->next_stack
>>>
>>> might work.
>>>
>>
>> It does:
>>
>> (gdb) p main_thread.s.bc.fp->next_stack
>> $4 = 0x7fffdf3ff730
>
> Oh.  I was confused, sorry, I meant
>
> (gdb) p main_thread.s.bc.fp->saved_fp
> (gdb) p main_thread.s.bc.fp->saved_fp->saved_fp
> (gdb) p main_thread.s.bc.fp->saved_fp->saved_fp->saved_fp
>
> and so on for a few iterations.  We want to know whether any of the
> stack frames exceed 1024 bytes :-)
>
> Thanks, and sorry for the confusion!

Don't worry. I count 14 iterations until we hit 0x0:

(gdb) p main_thread.s.bc.fp
$1 = (struct bc_frame *) 0x7fffdf3ff710
(gdb) p main_thread.s.bc.fp->saved_fp
$2 = (struct bc_frame *) 0x7fffdf3ff640
(gdb) p main_thread.s.bc.fp->saved_fp->saved_fp
$3 = (struct bc_frame *) 0x7fffdf3ff5d8
(gdb) p main_thread.s.bc.fp->saved_fp->saved_fp->saved_fp
$4 = (struct bc_frame *) 0x7fffdf3ff578
(gdb) p main_thread.s.bc.fp->saved_fp->saved_fp->saved_fp->saved_fp
$5 = (struct bc_frame *) 0x7fffdf3ff4a8
(gdb) p main_thread.s.bc.fp->saved_fp->saved_fp->saved_fp->saved_fp->saved_fp
$6 = (struct bc_frame *) 0x7fffdf3ff3d8
(gdb) p main_thread.s.bc.fp->saved_fp->saved_fp->saved_fp->saved_fp->saved_fp->saved_fp
$7 = (struct bc_frame *) 0x7fffdf3ff370
(gdb) p main_thread.s.bc.fp->saved_fp->saved_fp->saved_fp->saved_fp->saved_fp->saved_fp->saved_fp
$8 = (struct bc_frame *) 0x7fffdf3ff2a0
(gdb) p main_thread.s.bc.fp->saved_fp->saved_fp->saved_fp->saved_fp->saved_fp->saved_fp->saved_fp->saved_fp
$9 = (struct bc_frame *) 0x7fffdf3ff238
(gdb) p main_thread.s.bc.fp->saved_fp->saved_fp->saved_fp->saved_fp->saved_fp->saved_fp->saved_fp->saved_fp->saved_fp
$10 = (struct bc_frame *) 0x7fffdf3ff1d8
(gdb) p main_thread.s.bc.fp->saved_fp->saved_fp->saved_fp->saved_fp->saved_fp->saved_fp->saved_fp->saved_fp->saved_fp->saved_fp
$11 = (struct bc_frame *) 0x7fffdf3ff108
(gdb) p main_thread.s.bc.fp->saved_fp->saved_fp->saved_fp->saved_fp->saved_fp->saved_fp->saved_fp->saved_fp->saved_fp->saved_fp->saved_fp
$12 = (struct bc_frame *) 0x7fffdf3ff0c8
(gdb) p main_thread.s.bc.fp->saved_fp->saved_fp->saved_fp->saved_fp->saved_fp->saved_fp->saved_fp->saved_fp->saved_fp->saved_fp->saved_fp->saved_fp
$13 = (struct bc_frame *) 0x7fffdf3ff050
(gdb) p main_thread.s.bc.fp->saved_fp->saved_fp->saved_fp->saved_fp->saved_fp->saved_fp->saved_fp->saved_fp->saved_fp->saved_fp->saved_fp->saved_fp->saved_fp
$14 = (struct bc_frame *) 0x7fffdf3ff010
(gdb) p main_thread.s.bc.fp->saved_fp->saved_fp->saved_fp->saved_fp->saved_fp->saved_fp->saved_fp->saved_fp->saved_fp->saved_fp->saved_fp->saved_fp->saved_fp->saved_fp
$15 = (struct bc_frame *) 0x0

Oliver