Skip to content

Commit

Permalink
VirtualMachine: do not qualify the platform on FreeBSD
Browse files Browse the repository at this point in the history
Linux NaCl loader si executed in FreeBSD linuxulator
and the platform qualification will fail.
  • Loading branch information
illwieckz committed Sep 16, 2024
1 parent bb5edd1 commit 04fb7ca
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/engine/framework/VirtualMachine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -280,6 +280,19 @@ static std::pair<Sys::OSHandle, IPC::Socket> CreateNaClVM(std::pair<IPC::Socket,
#else
Q_UNUSED(bootstrap);
args.push_back(nacl_loader.c_str());

#if defined(__FreeBSD__)
/* While it is possible to build a native FreeBSD engine, the only available NaCl loader
is the Linux one, which can run on Linuxulator (the FreeBSD Linux compatibility layer).
The Linux NaCl loader binary fails to qualify the platform and aborts with this message:
Bus error (core dumped)
The Linux NaCl loader runs properly on Linuxulator when we disable the qualification.
It also works without nacl_helper_bootstrap. */

args.push_back("-Q");
#endif
#endif
if (debug) {
args.push_back("-g");
Expand Down

0 comments on commit 04fb7ca

Please sign in to comment.