forked from wasmerio/wasmer
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(metering): Prevent execution past limit
Inject metering checks ahead of executing the next code block, instead of after. This ensures that execution will always return with an error as soon as it is determined that the execution limit will be exceeded, without ever actually exceeding the limit. If execution returns with ExecutionLimitExceededError, get_points_used will return some number of points greater than the limit, since the INTERNAL_FIELD_USED is incremented and saved prior to the limit check. Fix wasmerio#999
- Loading branch information
Showing
1 changed file
with
91 additions
and
54 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters