Expected behavior
No UB on PPC.
Actual behavior
The generator does not cast the varg arguments before passing them to add_cs_detail(). And sometimes it passes non-64bit values but unpacks them as uint64_t. Which is UB for some compilers (PPC apparently).
In general we should always cast to uint64_t values before passing them as vargs. The operand handler can cast them back.
Steps to reproduce the behavior
Compile Capstone for PPC.
Additional Logs, screenshots, source code, configuration dump, ...
Could be fixed by: #2135
cc @thestr4ng3r
Expected behavior
No UB on PPC.
Actual behavior
The generator does not cast the
vargarguments before passing them toadd_cs_detail(). And sometimes it passes non-64bit values but unpacks them asuint64_t. Which is UB for some compilers (PPC apparently).In general we should always cast to
uint64_tvalues before passing them as vargs. The operand handler can cast them back.Steps to reproduce the behavior
Compile Capstone for PPC.
Additional Logs, screenshots, source code, configuration dump, ...
Could be fixed by: #2135
cc @thestr4ng3r