Originally Posted by Farmbuyer
And...? What's the point of foo_address? You can't do anything with machine addresses inside a script.
|
Pointer addresses can always be used to visually compare and see if any two pointers refer to the same address (functionally, no different than FuncA==FuncB). This is the same as any other by-reference value type.
Originally Posted by Farmbuyer
More generally, what would you do when taint is detected?
- Print an error and refuse to call the function? That's what happens by default already.
|
This only happens with the protected Blizzard functions, not ones defined by addons.
Note the OP posted this as prototype code, not necessarily meant for actual use, but to explain a process in place by Blizzard. The actual code in place is in C code that checks the current execution taint instead of if the function pointer stored has changed. This is why
hooksecurefunc() works, as the hook function points to secure C code rather than a Lua function. The execution taint updates status every table index (including global environment) and function call.