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

From: Pip Cet <[email-masked]>
Date: Tue, 07 Jan 2025 13:51:56 +0000

"Rob Browning" <[email-masked]> writes:

> Pip Cet <[email-masked]> writes:
>
>> Same compiler?  Is ASLR in use?
>
> Should be roughly the same compiler, both are building a "current"
> unstable tree, and I build the one on zelenka a few days ago and the
> mmdebstrap one the day before yesterday.  Not sure offhand wrt ASLR.

Hmm.  Is there any way for you to share the binaries that don't work?
It would be interesting to see whether the binary that crashes on
silicon works in the emulator.

>> In any case, I'm always interested in weird machines, even if they're
>> virtual, so I'd appreciate such instructions.
>
> OK, so if you have access to a Debian host with recent enough versions
> (fwiw, I was likely using trixie (testing) versions of debvm and
> mmdebstrap), this should work.

Thank you very much!  The instructions worked for me!

I could build Emacs, but, as expected, there was no crash.

It's still possible that __builtin_unwind_init was buggy in one GCC
version but not the other, but it does generate what looks like the
right code here, which makes that possibility less likely.

>> Can you disassemble the Fwhile, eval_sub, and visit_static_gc_roots
>> functions?  I assume s390 disassembled code isn't too hard to read...
>
> I'll plan to try that later, along with retrieving the requested
> backtraces.

If you can do so on a binary that doesn't work, mark_threads would also
be an interesting function, since that's where __builtin_unwind is
inlined.

Pip