<div dir="ltr"><div>I've been playing with OrcJIT a bit, and from the looks of it I can (like in the previous JIT I suppose?) ask for a function to be re generated.</div><div><br></div><div>If I've given the address of the function that LLVM gave me to an external party, do "I" need to ensure thread-safety?</div><div><br></div><div>Or is it safe to ask OrcJIT to re generate code at that address and everything will work magically?</div><div><br></div><div>I'm thinking it won't because it's quite possible some thread might be executing code, and we'll be asking LLVM to write bytes there.</div><div><br></div><div>How does one generally go do such updates? I'm looking for some guidance without adding a trampoline in front of it. Do runtimes that support re-generation of code have an if check or something before entering the method?</div></div>