graphic: 0.796 instruction: 0.767 device: 0.756 semantic: 0.572 vnc: 0.475 boot: 0.282 other: 0.180 socket: 0.147 network: 0.145 mistranslation: 0.128 assembly: 0.079 KVM: 0.016 QEMU 7.0.0-rc0: Random segfaults when running grep using qemu-arm-static Description of problem: I'm running ARM binaries using 32 bit qemu-arm-static on x86_64 host. Sometimes when running grep via qemu, I get a random segmentation fault. Sometimes it happens faster, sometimes it takes several thousand iterations, but sooner or later it happens and really annoying. This problem is also reproduced on 6.2, 5.2 and 5.1 releases, and NOT reproduced on 5.0 I wrote small test to demonstrate this bug. Steps to reproduce: 1. Download the test environment: [qemu-test-segfault.tar.bz2](/uploads/8f52617d46ba1e5bf29fc273cd07131d/qemu-test-segfault.tar.bz2) 2. `$ make # To build the docker container` 3. `$ make shell # To run ARM bash` 4. Inside a container, run `while true; do /qemu /bin/grep -E f text > /dev/null; [ $? -ne 0 ] && break; done`. After a while you will get segfault: ``` [root@0d81b08f032b /]# /qemu --version qemu-arm version 6.2.90 Copyright (c) 2003-2022 Fabrice Bellard and the QEMU Project developers [root@0d81b08f032b /]# while true; do /qemu /bin/grep -E f text > /dev/null; [ $? -ne 0 ] && break; done Segmentation fault (core dumped) [root@0d81b08f032b /]# ```