[compat] fix spinlock default ctor causing crash on OpenBSD

Signed-off-by: lizzie <lizzie@eden-emu.dev>
This commit is contained in:
lizzie 2025-08-20 23:39:21 +00:00 committed by crueter
parent 7da9381eea
commit 29e687994d
Signed by: crueter
GPG key ID: 425ACD2D4830EBC6
3 changed files with 5 additions and 5 deletions

View file

@ -2,7 +2,7 @@
```sh
pkg_add -u
pkg_add cmake nasm git boost unzip--iconv autoconf-2.72p0 bash ffmpeg glslang gmake llvm-19.1.7p3
pkg_add cmake nasm git boost unzip--iconv autoconf-2.72p0 bash ffmpeg glslang gmake llvm-19.1.7p3 qt6
git --recursive https://git.eden-emu.dev/eden-emu/eden
cmake -DCMAKE_C_COMPILER=clang-19 -DCMAKE_CXX_COMPILER=clang++-19 -DDYNARMIC_USE_PRECOMPILED_HEADERS=OFF -DCMAKE_BUILD_TYPE=Debug -DENABLE_QT=OFF -DENABLE_OPENSSL=OFF -DENABLE_WEB_SERVICE=OFF -B /usr/obj/eden
```

View file

@ -225,10 +225,10 @@ bool IsUnderRosetta() {
} // anonymous namespace
#ifdef __OpenBSD__
constexpr auto default_cg_mode = Xbyak::DontSetProtectRWE;
#ifdef DYNARMIC_ENABLE_NO_EXECUTE_SUPPORT
static const auto default_cg_mode = Xbyak::DontSetProtectRWE;
#else
constexpr auto default_cg_mode = nullptr; //Allow RWE
static const auto default_cg_mode = nullptr; //Allow RWE
#endif
BlockOfCode::BlockOfCode(RunCodeCallbacks cb, JitStateInfo jsi, size_t total_code_size, std::function<void(BlockOfCode&)> rcp)

View file

@ -37,7 +37,7 @@ namespace {
struct SpinLockImpl {
void Initialize();
Xbyak::CodeGenerator code;
Xbyak::CodeGenerator code = Xbyak::CodeGenerator(4096, Xbyak::DontSetProtectRWE);
void (*lock)(volatile int*);
void (*unlock)(volatile int*);