Subject: bug#57789: Emacs 28.1 clone build with native compilation crashes on s390x

From: Andrea Corallo <[email-masked]>
Date: Fri, 16 Sep 2022 08:39:35 +0000

Eli Zaretskii <[email-masked]> writes:

>> From: Rob Browning <[email-masked]>
>> Cc: [email-masked]
>> Date: Wed, 14 Sep 2022 15:19:24 -0500
>> 
>> Eli Zaretskii <[email-masked]> writes:
>> 
>> > Please run the crashing command under GDB, and when it segfaults,
>> > produce the C-level and Lisp-level backtrace, and post them here.
>> 
>> Starting from scratch with the emacs-28.1 commit I can reproduce the
>> failure when building via
>> 
>>   ./configure --prefix=/home/rlb/opt/emacs-tmp --with-native-compilation
>> 
>> It crashes with the same segfault repeatably, i.e. if you run make
>> again, it crashes again on the previously mentioned "... -l comp -f
>> batch-byte+native-compile international/titdic-cnv.el" invocation.  That
>> crash output is attached below.
>> 
>> After adjusting the Makefile.in invocation so I could run it with gdb in
>> exactly the same environment once it's failing on that command, I
>> captured the backtrace and included it below.
>
> Thanks.  The backtrace indicates that the crash is in GC.  This
> probably means we have some fundamental problem on that architecture.
> Andrea, any advice for how to investigate?

Mmmh one cheap way to maybe gather more info is to have a run under
valgrind.

Other than that I typically start debugging with GDB and possibly
rr. Like what is (or was) the object the GC is crashing on?  Why?
What's the last piece of code that touched it? Why?  IIUC here we have
no debug symbols so this makes it very difficult.

BTW the fact that -g has an impact on the crash is very odd

  Andrea