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

From: Eli Zaretskii <[email-masked]>
Date: Sun, 14 Mar 2021 21:40:47 +0200

> From: Andrea Corallo <[email-masked]>
> Cc: [email-masked], [email-masked]
> Date: Sun, 14 Mar 2021 18:47:12 +0000
> 
> this really look like a libgccjit bug.  I think would be interesting if
> you have time to:
> 
> 1- produce a libgccjit reproducer (applying the attached patch before
> running the test) and post it so we can check if we can reproduce and
> investigate this on other setups.
> 
> 2- run all the comp-tests.el tests excluding `comp-tests-bootstrap' just
> to make sure we are fine with all the reduced testcases.

The reproducer for stage2 crash is attached.  It doesn't compile,
because the code is really invalid C.  First, there's a string which
provides the absolute file name of libgccjit, and it uses backslashes
(as the original file name does), but the backslashes aren't doubled
when the reproducer is generated, so GCC complains about unknown
escapes.  I fixed that manually, but it still fails to compile because
there are literal "nil"s in several places where (I think) strings
were supposed to be.  And maybe there are more problems, I didn't try
to pursue this further.  If you'd like me to try to compile a
cleaned-up reproducer, send it to me and I will try.

All the other tests in comp-tests.el pass.