mirror of
https://github.com/xmrig/xmrig.git
synced 2024-12-22 19:49:36 +00:00
Merge pull request #3461 from SChernykh/dev
RandomX: check pointer sizes during JIT initialization
This commit is contained in:
commit
9fbdcc0ef0
1 changed files with 1 additions and 0 deletions
|
@ -260,6 +260,7 @@ typedef void(randomx::JitCompilerX86::* InstructionGeneratorX86_2)(const randomx
|
|||
|
||||
#define JIT_HANDLE(x, prev) do { \
|
||||
const InstructionGeneratorX86_2 p = &randomx::JitCompilerX86::h_##x; \
|
||||
static_assert(sizeof(p) == sizeof(randomx::JitCompilerX86::engine[k]), "Pointer size mismatch"); \
|
||||
memcpy(randomx::JitCompilerX86::engine + k, &p, sizeof(p)); \
|
||||
} while (0)
|
||||
|
||||
|
|
Loading…
Reference in a new issue