mirror of
https://github.com/Xahau/xahaud.git
synced 2026-09-27 15:38:01 +00:00
When a hook calls accept() or rollback() with a reason string pointer outside of wasm memory, HOOK_EXIT returned OUT_OF_BOUNDS and let the hook keep running. If the hook then returned normally, the execution ended with exitType UNSET and the HookExecution metadata carried no useful information about what happened. Behind the new fixHookExitOutOfBounds amendment, HOOK_EXIT now terminates the hook as a ROLLBACK with exitCode OUT_OF_BOUNDS (mirroring the guard violation path), so HookResult and HookReturnCode in the transaction metadata make the failure visible to hook developers. Adds a SetHook test covering accept() and rollback() with an out of bounds reason, with and without the amendment. Fixes #767