linux-user: (recursive) segfault when built with -static -disable-pie
There's a Debian bug report, https://bugs.debian.org/1053101 , which prompted me to do this research.
Basically, when qemu-aarch64 (this was my reproducer) is built with -static -disable-pie
, it will segfault when trying to run certain executables, while works fine when -disable-pie is omitted. When it segfaults, there's a signal handler loop, - it segfaults within a sigsegv handler, which causes another sigsegv, etcetera. This is observed with multiple versions of qemu, - I tried 6.0, 7.2 and current 8.1.