Subject: Re: bug#47067: 28.0.50; [feature/native-comp] Crash while scrolling through dispnew.c

From: Pip Cet <[email-masked]>
Date: Fri, 12 Mar 2021 18:42:17 +0000

On Fri, Mar 12, 2021 at 12:52 PM Eli Zaretskii <[email-masked]> wrote:
> > From: Andrea Corallo <[email-masked]>
> > Cc: [email-masked]
> > Date: Fri, 12 Mar 2021 12:04:34 +0000
> >
> > >> >  emacs -Q
> > >> >  C-h sit-for RET
> > >> >  Click on the link to subr.el
> > >> >  In subr.el go to where sit-for calls sleep-for and type C-h f RET
> > >> >  Click on "C source code" to display dispnew.c
> > >> >  Scroll down with C-n or C-v
> > >>
> > >> I can't reproduce here :/
> > >
> > > Did you try the 32-bit build --with-wide-int?  It could be specific to
> > > that configuration.
> >
> > Good point, it tried on 32-bit before and now 32-bit --with-wide-int but
> > still could not reproduce.
>
> Is there any data I can collect to help diagnose the issue?  Anything
> at all?  Like maybe disassembly of this F632d626567696e6e696e672d6f662d73746174656d656e742d31_c_beginning_of_statement_1_0()
> function or some part of it?

I think disassembling that function couldn't hurt, and it might help,
particularly the insns around the call site (but, of course, Andrea's
the expert). Passing 0x28 where the argument pointer should be is very
wrong; my suspicion is that the frame base pointer is NULL and there
are five arguments, leaving us with 0x28 pointing to what's allegedly
the base of the "proper" stack, but I don't think that's even how it's
supposed to work in the dynamic-scope case...

Pip