Patching binary code. Part 1
Why
There are times when you want to change the behavior of a function that you cannot recompile for some reason. For example, there could be a bug in a runtime function of your language. Changing the version of your language is typically quite a challenge and it could be much better to patch that function instead of making drastic changes like switching to a different version.
Or as another example, there could be some 3rd party library that has a bug and the author didn’t provide a source code. Or perhaps you want to do some pre or post-processing. For example, you may want to save some input or output parameters or even modify them.
For further discussion let's [...Read More]