Sparc QEMU segfaults directly if a TCG plugin is used but no logging is
specified via `-d plugin`.
If logging is enabled it segfaults also. But a little later.
I tested it also with PPC32 and Hexagon. They seem to work fine.
Host: Fedora 41 - Linux 6.12.25-1.qubes.fc37.x86_64
Anyone had this problem before as well?
## Steps to reproduce
Build
```bash
mkdir build
cd build
../configure --disable-capstone --enable-plugins --enable-asan
--enable-debug
--target-list=sparc-linux-user,sparc64-linux-user,hexagon-linux-user,ppc-linux-user
ninja
```
Run with `execlog` plugin:
```
./qemu-sparc64 -plugin file=./contrib/plugins/libexeclog.so
~/Downloads/base77/bin/ls
Segmentation fault (core dumped)
./qemu-sparc64 -plugin file=./contrib/plugins/libexeclog.so -d plugin
~/Downloads/base77/bin/ls
0, 0x7160e0600380, 0x10bc, "mov %g0, %fp"
0, 0x7160e0600384, 0xb0a0239c, "sub %sp, 0xb0, %sp"
0, 0x7160e0600388, 0xafa803a6, "add %sp, 0x8af, %l3"
# snip ...
0, 0x7160e0600608, 0x440a180, "cmp %g5, %g4"
0, 0x7160e060060c, 0x19006008, "bleu,pn %xcc, "
0, 0x7160e0600610, 0xff3f1082, "mov -1, %g1"
0, 0x7160e0600614, 0x2070309b, "srlx %g1, 0x20, %o5"
0, 0x7160e0600618, 0x82059c6, "ldx [ %g4 + 8 ], %g3"
Segmentation fault (core dumped)
```
Sparc binaries:
https://ftp2.eu.openbsd.org/pub/OpenBSD/7.7/sparc64/base77.tgz
Gitlab issue: https://gitlab.com/qemu-project/qemu/-/issues/3008