Security of Julia, since possible to change the compiler at runtime

Continuing the discussion from This month in Julia World - 2026-08:

Slide 48

Not too surprising. If you have access to the compiler (or infrastructure), then you can change the generated code:

We can already change the parser at runtime. I believe we can also change the compiler in arbitrary ways. E.g. a package could?

Is there any way around this in Julia or languages like Lisp? Even Python? Can and should the compiler be code that is is a separate process? An .so/.dll? could you still unload it and load a new one from the REPL?

Hmmm. As soon as you load a package, its __init__() function runs, which can run arbitrary code, right? So a malicious package can just run malicious code in __init__() - no need to change the compiler.