News for hackers. Stuff that matters.
Re:Racket: The Lisp for the Modern Day by p_l on Thursday June 29, 2023 @10:04AM (#36520500)
At worst you have to ensure that you separate what needs to be writeable from executable, and then flip mappings RW->RX when generating new code, just like other JIT compilers do.
Re:Racket: The Lisp for the Modern Day by criddell on Thursday June 29, 2023 @10:32AM (#36520871)
Oh okay. I was thinking of self-modifying, not just code generation. That was something that was done occasionally by DOS and Windows programmers before the introduction of DEP in Windows XP.
Re:Racket: The Lisp for the Modern Day by trws on Thursday June 29, 2023 @11:36AM (#36521900)
Yeah, self modifying has become harder. As far as I know the most robust solution to that now is like what Julia does, where it can compile new generations of any module to update call targets, for example. At worst, when seccomp disallows flipping a writable page to executable at runtime, you can always compile into a file then dlopen the file. In other words, it can take many more contortions now than it used to, but it’s still possible.