VirtualBox

Ignore:
Timestamp:
Nov 22, 2024 2:22:42 AM (5 months ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
166066
Message:

FE/Qt,VBoxManage,VBoxHeadless: Refuse to run in WoW64 to prevent mixing up amd64 and arm64 builds in the out directory. jiraref:VBP-1466

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VBoxHeadless/VBoxHeadless.cpp

    r106061 r107100  
    4343#include <VBox/log.h>
    4444#include <VBox/version.h>
     45#include <iprt/arch.h>
    4546#include <iprt/buildconfig.h>
    4647#include <iprt/ctype.h>
     
    5556#include <iprt/errcore.h>
    5657#include <iprt/thread.h>
     58#include <iprt/system.h>
    5759#include <VBoxVideo.h>
    5860
     
    11521154    }
    11531155
     1156    /* Before we try to initialize COM, make sure we're not running inside
     1157       an emulator (these days, running amd64 code in an emulator on arm64). */
     1158    uint32_t const uNativeArch = RTSystemGetNativeArch();
     1159    if (uNativeArch != RT_ARCH_VAL && uNativeArch != 0)
     1160    {
     1161        RTMsgError("Binary (%s) doesn't match the host CPU (%s)!",
     1162                   RTArchValToString(RT_ARCH_VAL), RTArchValToString(uNativeArch));
     1163        return RTEXITCODE_FAILURE;
     1164    }
     1165
    11541166    HRESULT hrc;
    11551167    int vrc;
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette