Self-Replace: A Utility For Self Replacing Executables
This is interesting.<p>Google Chrome can patch binaries and the Linux kernel can be patched while running.<p>I would like this capability for general purpose software, hot code reloading. Can do seamless non-breaking changes to a live server without a full restart.<p>Would be useful for Function as a Service and WASM runtimes if you could live patch code running.<p>I generally rely on Kubernetes or CI to do a rolling deploy of software to switch to the new version, but if we could patch a server while running that would be interesting. Would have interesting interactions with socket connections using the old code and connections using the new code and all the complicated states you can get into, if your data structures are different.<p>How do you move data if you added a field to your data structure? Presumably if you added a field, there isn&#x27;t enough memory allocates in the existing data structures... Your malloc is for the wrong size.