While very(!) cool as a proof of concept,
This type of solution should probably be avoided for security, stability and portability reasons.
Allowing a string in your program to be dynamically converted to assembly code, copied to executable memory and be executed is a remote code execution security hole just waiting to happen.
I'm wondering what the use cases for this were, and if they couldn't be achieved in another way.
Allowing a string in your program to be dynamically converted to assembly code, copied to executable memory and be executed is a remote code execution security hole just waiting to happen.
I'm wondering what the use cases for this were, and if they couldn't be achieved in another way.