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

From: Andrea Corallo <[email-masked]>
Date: Sun, 14 Mar 2021 20:30:08 +0000

Eli Zaretskii <[email-masked]> writes:

>> 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.

That's sad :(

> 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.

I've the impression it's "just" failing to quote strings...  And on GCC
pre 11 we rely on strings to store immediates in the eln (so we have a
ton of).

I tried to produce a reproducer for bootstrap stage2 on my system 64bit
using the libgccjit I've (11) but forcing back the use of the strings
and the result is not compilable either.

> 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.

I've the impression it might be a *very* time consuming task unless you
have an automated way of doing it.  The outcome might be allowing for
investigating a GCC bug that most likely is not reproducible on a
contemporary GCC and that we observe only in a test for now... So I'd be
a little reluctant.

But I think would be nice to try to understand if the issue is "just"
the quoting or what's the state and report it as a GCC bug.  I'll try to
have a look (not really sure when, unless we consider this urgent).

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

That's something...

Thanks

  Andrea