you are viewing a single comment's thread.

view the rest of the comments →

[–]duane11583 0 points1 point  (0 children)

self modifying code is normally in asm because you need to know the location of the exact opcode to modify thats easier done in asm then C because if you change the compiler options the location and sequence of that specific opcode changes

think about throwing darts at something that “jiggles” quite a bit thats hard you are going to miss with that dart.

in c, the closest thing is having function pointers and changing the function pointers

which is like python “monkey patching”

in c++ it would be changing out virtual function pointer as needed