Hi, I'm trying to use Qemu to assist with a cross-compiler environment. The underlying is using gentoo and musl as the basic toolchain. Very quick version is that I have a arm 32bit chroot running on a powerful AMD Zen2 processor machine, and I'm using user mode emulation to run the binaries. That runs a fairly vanilla gcc/musl toolchain and in turn I use that to build the images for my board, which is an imx7 armv7a processor.
I'm able to run all/most of my binaries correctly on qemu 6.2.0. However, on newer versions (eg qemu 8.x) I hit a qemu: uncaught target signal 7 (Bus error) - core dumped when trying to use nodejs to build our web UI front end Now, probably the better answer is to figure out what the issue is with nodejs, however, lets summarise this as "it's been very difficult". I can't get gdb to show me the faulting code. I've struggled to even get nodejs to give me enough debugging to show what it's doing and at present I can't even find the faulting module, let alone the line of code which causes it. So my question is whether it's possible to configure/patch qemu to ignore misaligned memory accesses on arm 32bit emulation? Meaning, I totally agree this code is not going to function correctly on the target, however, I simply need it to succeed on my build machine (which is amd64 arch), so I desire to punt the problem into the future... The change appears to come in somewhere around the qemu 7.0 series. I have tried looking through the commits list to see if I can identify when it landed. I don't see any command line args to toggle this, so I imagine I'm looking at a code change? Could anyone comment on a possible "quick fix" here please? Note, just to head off a few suggestions: I've tried GDB outside of the chroot, I couldn't get a useful backtrace. I've tried to build a static amd64 nodejs binary, but blocked on some aspects of this. I've considered a cross compile of this part of the code, but it complicates the build process signficantly. I've considered remaining on qemu 6.2, but I suffer random lockups where processes seem to block forever waiting on some semaphore (rsync seems to tickle this occasionally?), and it also feels like qemu 8.x is faster than 6.2? Thanks for any help Ed W