News for hackers. Stuff that matters.
Re:What if you knew how computers work? (2015) by amelius on Saturday October 10, 2020 @10:28AM (#24739206)
Isn't self-modifying code already the norm, with JIT compilers?
Re:What if you knew how computers work? (2015) by tylerhou on Saturday October 10, 2020 @06:54PM (#24742504)
I am under the impression that JIT compilers do not modify the compiler’s own bytecode. They write generated code into a separate data region and mark that region as executable. If the code needs to modified, then control transfers back to the compiler which can mark the region as writable again.

The same can be done for a binary and it’s own code, but I wonder if it’s used as a signal in antivirus protections if done too often.

https://en.m.wikipedia.org/wiki/W%5EX

Re:What if you knew how computers work? (2015) by mcguire on Saturday October 10, 2020 @12:16PM (#24739926)
... which is why JIT compiled code is slower in some circumstances.