-
Notifications
You must be signed in to change notification settings - Fork 3.8k
[move-vm] Adding negative FV tests for bytecode and runtime verifier #17147
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
This stack of pull requests is managed by Graphite. Learn more about stacking. |
...ve-vm/transactional-tests/tests/function_values_safety/closure_assign_local_num.paranoid.exp
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor comments. Great to have these!
|
||
pub type VMResult<T> = ::std::result::Result<T, VMError>; | ||
pub type BinaryLoaderResult<T> = ::std::result::Result<T, PartialVMError>; | ||
pub type PartialVMResult<T> = ::std::result::Result<T, PartialVMError>; | ||
|
||
static STABLE_TEST_DISPLAY: Lazy<Mutex<bool>> = Lazy::new(|| Mutex::new(false)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not OnceCell
? I think it is designed exactly for this kind of config
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
This adds a number of tests (wrong code) which are run in two ways: one with bytecode verifier enabled where expect it to be caught in the verifier, one with bytecode verifier disabled where we expect it to be called by paranoid mode. One bug was discovered this far by this approach, where paranoid mode seems to miss a check (#17137). Also changes the way how the verifier is disabled by using a configuration option. The failpoints used before can't be used with parallel test execution.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
✅ Forge suite
|
✅ Forge suite
|
✅ Forge suite
|
Description
This adds a number of negatiive tests (wrong code) which are run in two ways: one with bytecode verifier enabled where we expect it to be caught in the verifier, one with bytecode verifier disabled where we expect it to be checked by paranoid mode.
One challenge with these tests is that in order to hit paranoid mode, they need to be written such that the issue is reached in an execution path, and not just by loading module code. This is why most tests are triggered via scripts supported by a helper module.
This also changes the way how the verifier is disabled by using a configuration option. The failpoints used before can't be used with parallel test execution.
How Has This Been Tested?
These are tests
Type of Change
Which Components or Systems Does This Change Impact?