Package: qemu-user-static
Version: 1:7.0+dfsg-7
Severity: important
X-Debbugs-Cc: osm...@problemloesungsmaschine.de

Dear Maintainer,

I am using QEMU user mode emulation to test my software on non-amd64 
architectures. I have qemu-user-static and binfmt-support installed so that I 
can run foreign binaries seamlessly.

On Debian Testing with QEMU 7, aarch64 user mode emulation always segfaults:
```
manx@appendix:~/tmp$ cat nothing.c
int main() {
    return 0;
}
manx@appendix:~/tmp$ aarch64-linux-gnu-gcc -std=c18 -O3 -Wall -Wextra 
-Wpedantic nothing.c
manx@appendix:~/tmp$ ./a.out
qemu: uncaught target signal 11 (Segmentation fault) - core dumped
Segmentation fault
manx@appendix:~/tmp$
```

Other architectures like s390x work fine:
```
manx@appendix:~/tmp$ s390x-linux-gnu-gcc -std=c18 -O3 -Wall -Wextra -Wpedantic 
nothing.c
manx@appendix:~/tmp$ ./a.out
manx@appendix:~/tmp$
```

Static linking does not help:
```
manx@appendix:~/tmp$ aarch64-linux-gnu-gcc -std=c18 -O3 -Wall -Wextra 
-Wpedantic -static nothing.c
manx@appendix:~/tmp$ ./a.out
qemu: uncaught target signal 11 (Segmentation fault) - core dumped
Segmentation fault
manx@appendix:~/tmp$
```

relevant versions:
```
manx@appendix:~/tmp$ aarch64-linux-gnu-gcc --version
aarch64-linux-gnu-gcc (Debian 11.3.0-3) 11.3.0
Copyright (C) 2021 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
manx@appendix:~/tmp$ qemu-aarch64-static --version
qemu-aarch64 version 7.0.0 (Debian 1:7.0+dfsg-7)
Copyright (c) 2003-2022 Fabrice Bellard and the QEMU Project developers
manx@appendix:~/tmp$
```

QEMU aarch64 user mode emulation works fine on Debian 11 Bullseye with QEMU 5.2.

Thanks,
Jörn


-- System Information:
Debian Release: bookworm/sid
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: amd64 (x86_64)
Foreign Architectures: i386, armel, s390x, armhf, arm64, ppc64el

Kernel: Linux 5.18.0-2-amd64 (SMP w/4 CPU threads; PREEMPT)
Kernel taint flags: TAINT_PROPRIETARY_MODULE, TAINT_OOT_MODULE, 
TAINT_UNSIGNED_MODULE
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), 
LANGUAGE=en_US:en
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

qemu-user-static depends on no packages.

Versions of packages qemu-user-static recommends:
ii  binfmt-support  2.2.2-1
ii  systemd         251.2-7

qemu-user-static suggests no packages.

-- no debconf information

Reply via email to