summary refs log tree commit diff stats
path: root/results/classifier/user-mode-bugs/1812
blob: 325abc9b82d2b4e44a7255dea75c0e70013c0522 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
older programs running under qemu-aarch64 segfaults
Description of problem:
Numerous aarch64 programs segfaults when run under qemu-aarch64.
Steps to reproduce:
1. Install an arm64 chroot (with working qemu-aarch64 binfmt_misc setup):
```
debootstrap --variant=minbase --arch=arm64 jessie /tmp/jessie-arm64/ http://archive.debian.org/debian
or
debootstrap --variant=minbase --arch=arm64 xenial /tmp/xenial-arm64/ http://ports.ubuntu.com/
```
2. build qemu-aarch64; cp qemu-aarch64 /tmp/jessie-arm64/
3. chroot /tmp/jessie-arm64/
4. ./qemu-aarch64 /bin/ls
```
qemu: uncaught target signal 11 (Segmentation fault) - core dumped
Segmentation fault 
```
Additional information:
Old userspace (eg Debian jessie, Ubuntu xenial) does not work within qemu 8.1-rc2 aarch64 linux-user emulation, since commit 59b6b42cd3446862567637f3a7ab31d69c9bef51 .  My guess is that old userspace isn't prepared for recent CPU features, but it still smells strange.

Not all programs segfaults. dash works, ls or bash does not.

A chroot is easier in this case, since many old programs don't run inside current environment, like asserting while reading locale-specific information.  To run debootstrap and to enter the resulting chroot, a working qemu-aarch64 binfmt_misc setup is needed.

Reverting the mentioned commit makes everything work again.