summary refs log tree commit diff stats
path: root/results/scraper/launchpad-without-comments/1912107
blob: 5fcbdb117a01c058109139111d80935bb04b973c (plain) (blame)
1
2
3
4
5
6
7
8
Option to constrain linux-user exec() to emulated CPU only

When trying to reproduce a bug someone reported on an actual AMD K10[1], ​I tried to directly throw `qemu_x86-64 -cpu 
​phenom path/to/wrongly-labelled-instruction-set/gcc 1.c` at the problem, but failed to get an "illegal instruction" as expected. A quick investigation reveals that the error is actually caused by one of gcc's child processess, and that the said process is being ran directly on the host. A similar problem happens with trying to call stuff with /usr/bin/env.

 ​[1]: https://github.com/Homebrew/brew/issues/1034

Since both the host and the guest are x86_64, I deemed binfmt inapplicable to my case. I believe that QEMU should offer a way to modify exec() and other spawning syscalls so that execution remains on an emulated CPU in such a case. Call it an extra layer of binfmt, if you must.