Open Frando opened 1 year ago
what qemu version are you using? I'll test this eventually myself, but would be good information to have (and also if maybe a later qemu has fixed it)
docker run --privileged --rm tonistiigi/binfmt:master --version
$ docker run --privileged --rm tonistiigi/binfmt:master --version
binfmt/82a943b qemu/v7.1.0 go/1.20.7
Sorry, seems like I was mistaken in that binfmt showed the installed version... Can you do
qemu-system-x86_64 --version
instead :)
here's an example of mismatch
$ docker run --privileged --rm tonistiigi/binfmt:master --version
binfmt/82a943b qemu/v7.1.0 go/1.20.2
$ qemu-system-x86_64 --version
QEMU emulator version 8.0.0
Copyright (c) 2003-2022 Fabrice Bellard and the QEMU Project developers
Yes, I get the same as you:
$ docker run --privileged --rm tonistiigi/binfmt:master --version
binfmt/82a943b qemu/v7.1.0 go/1.20.7
$ qemu-system-x86_64 --version
QEMU emulator version 8.0.0
Copyright (c) 2003-2022 Fabrice Bellard and the QEMU Project developers
Hi @Emilgardis, do you have any further ideas or how we could go about identifying/fixing this issue?
Checklist
Describe your issue
Hi, when cross-compiling a crate we use (redb) to android we discovered a very weird issue with targets
aarch64-linux-android
andarmv7-linux-androideabi
. The original issue is here but I managed to create a minimal reproduction (see below).The issue is: When repeatedly creating a vector filled with
0u32
, it will happen that this vector's first element is not0u32
but instead a different value. So basically, the TLDR is:should never fail the assertion, but it does on
aarch64-linux-android
withcross test
.We have been pondering this for a few days but are completely out of ideas how and why this happens. If the qemu VM runs out of memory or something, it should panic with an OOM, shouldn't it?
Example
paste the following into
src/lib.rs
and run
The test should pass (and does when testing directly on the host) - but the above command fails with this:
Additional information / notes
No response
What target(s) are you cross-compiling for?
aarch64-linux-android
Which operating system is the host (e.g computer cross is on) running?
What architecture is the host?
What container engine is cross using?
cross version
cross 0.2.5 (37c681a 2023-07-17)