1
0
Fork 0
mirror of https://github.com/sockspls/badfish synced 2025-05-02 17:49:35 +00:00
BadFish/src/syzygy
Joost VandeVondele 876f07cbee Fix undefined behaviour with unaligned loads in syzygy code
Casting a pointer to a different type with stricter alignment
requirements yields to implementation dependent behaviour.
Practicaly everything is fine for common platforms because the
CPU/OS/compiler will generate correct code, but anyhow it is
better to be safe than sorry.

Testing with dbg_hit_on() shows that the unalignment accesses are
very rare (below 0.1%) so it makes sense to split the code in a
fast path for the common case and a slower path as a fallback.

No functional change (verified with TB enabled).
2016-11-06 11:48:07 +01:00
..
tbprobe.cpp Fix undefined behaviour with unaligned loads in syzygy code 2016-11-06 11:48:07 +01:00
tbprobe.h Rewrite syzygy in C++ 2016-11-05 07:55:08 +01:00