2 ms·
Threaded interpreters are a kind of interpreter that runs code by having an array of jump addresses in a row representing the ops to interpret so that you can a
by monocasa 2y ago
Threaded interpreters are a kind of interpreter that runs code by having an array of jump addresses in a row representing the ops to interpret so that you can amortize out the decode step.
It works kind of like ROP/JOP gadgets.
- jchw 2y agoAh, I either didn't know about the term threaded code or forgot about it. Thanks for the pointers. (Replying to you but also the sibling comment since both were posted around the same time.) At first I was thinking of cached interpreters as often seen in video game console emulators, but actually, this reminds me more of the "virtual machines" used in executable packers/obfuscators like VMProtect and Themida.
- monocasa 2y ago> but actually, this reminds me more of the "virtual machines" used in executable packers/obfuscators like VMProtect and Themida. Yeah, totally. Only changing the stack at runtime is helpful for avoiding the ire of anti-virus.