logic: Add ability to skip mprotect with StoreToAddress (#1523)

* Implement StoreToAddress param to optionally set memory page permissions

* Update comment
This commit is contained in:
nosoop
2021-07-10 12:45:00 -07:00
committed by GitHub
parent 823b55c22a
commit 387b85406e
2 changed files with 27 additions and 9 deletions
+8 -6
View File
@@ -698,13 +698,15 @@ native any LoadFromAddress(Address addr, NumberType size);
/**
* Store up to 4 bytes to a memory address.
*
* @param addr Address to a memory location.
* @param data Value to store at the address.
* @param size How many bytes should be written.
* If storing a floating-point value, use NumberType_Int32.
* @error Address is null or pointing to reserved memory.
* @param addr Address to a memory location.
* @param data Value to store at the address.
* @param size How many bytes should be written.
* If storing a floating-point value, use NumberType_Int32.
* @param updateMemAccess If true, SourceMod will set read / write / exec permissions
* on the memory page being written to.
* @error Address is null or pointing to reserved memory.
*/
native void StoreToAddress(Address addr, any data, NumberType size);
native void StoreToAddress(Address addr, any data, NumberType size, bool updateMemAccess = true);
methodmap FrameIterator < Handle {
// Creates a stack frame iterator to build your own stack traces.