I’m saving my data in the executable file of the program. I copy it to a temporary file, overwrite a part starting at a ‘magic string’ and rename it to the original. I know this is a bad idea, but I’m doing it just for experimenting. I got everything to work so far, except for that I have to re-enable
Tag: self-modifying
Self modifying code always segmentation faults on Linux
i found an article about self modifying code and tried to do some examples, but i get always segmentation faults. As fas as i can understand, there is a violation in memory permissions. The code segment is (r)ead/e(x)ecute and so the attempt of writting results to this fault. Is there a way to test the program either by changing the