Question about xmrig source code, is it bug in source?
Can You please help me understand one thing in xmrig sources.
I am debugging sources (purpose is performance improvement) and one thing puzzles very much and probably can be a bug?

Please look at xmrig/src/crypto/randomx/randomx.cpp these lines of code:

```
typedef void(randomx::JitCompilerX86::* InstructionGeneratorX86_2)(const randomx::Instruction&);

#define JIT_HANDLE(x, prev) do { \
		const InstructionGeneratorX86_2 p = &randomx::JitCompilerX86::h_##x; \
		printf("sizeof(p) %d sizeof(engine)/256 %d\n",sizeof(p),sizeof(randomx::JitCompilerX86::engine)/256); \
		memcpy(randomx::JitCompilerX86::engine + k, &p, sizeof(p)); \
	} while (0)

```

You may notice I added  one line of code with printf().
This is because something strange happens with function handlers assignments.
engine is array of type InstructionGeneratorX86 but handler is assigned to InstructionGeneratorX86_2.
Issue is they are different size (and probably mean different things).

Output is:
```
* ABOUT        XMRig/6.21.0 MSVC/2019 (built for Windows x86-64, 64 bit)
 * LIBS         libuv/1.44.2 OpenSSL/1.1.1s hwloc/2.9.0
 * HUGE PAGES   permission granted
 * 1GB PAGES    unavailable
 * CPU          Intel(R) Core(TM) i7-7700HQ CPU @ 2.80GHz (1) 64-bit AES
                L2:1.0 MB L3:6.0 MB 4C/8T NUMA:1
 * MEMORY       9.7/15.9 GB (61%)
                DIMM_A0: 16 GB DDR4 @ 2400 MHz MSI24D4S7D8MB-16
                DIMM_B0: <empty>
 * MOTHERBOARD  Micro-Star International Co., Ltd. - MS-1799
 * DONATE       0%
 * ASSEMBLY     auto:intel
 * POOL #1      benchmark algo auto
 * COMMANDS     hashrate, pause, resume, results, connection
 * OPENCL       disabled
 * CUDA         disabled
[2024-04-13 14:38:56.328]  bench    start benchmark hashes 250K algo rx/0
[2024-04-13 14:38:56.329]  cpu      use argon2 implementation AVX2
[2024-04-13 14:38:56.330]  msr      to access MSR registers Administrator privileges required.
[2024-04-13 14:38:56.330]  msr      FAILED TO APPLY MSR MOD, HASHRATE WILL BE LOW
[2024-04-13 14:38:56.330]  randomx  init dataset algo rx/0 (8 threads) seed 0000000000000000...
sizeof(p) 24 sizeof(engine)/256 8
sizeof(p) 24 sizeof(engine)/256 8
sizeof(p) 24 sizeof(engine)/256 8
sizeof(p) 24 sizeof(engine)/256 8
```

So single entry has size 8 bytes but const InstructionGeneratorX86_2 p has size 24 bytes.
I see that bigger struct is copied into smaller struct.
Is it ever correct?
I feel this is issue which may cause xmrig segfaults sometimes because some memory is spoiled after array..

Please, write me if my assumption is correct or not.






