[Bug] VM Load problems with one unit test poisons the whole module unit tests #10346
Labels
bug
Something isn't working
stale-exempt
Prevents issues from being automatically marked and closed as stale
🐛 Bug
Adding a unit test to a module can make existing tests fail.
To reproduce
Add the following code to the end of aptos-core/aptos-move/framework/aptos-stdlib/sources/debug.move:
and run "cargo test -p aptos-framework -- --skip prover".
This triggers a bug in the VM and causes not just this test to fail:
but also a bunch of other tests that previously passed:
Btw, just adding the
[test_only]
struct
declarations above does not cause failure.Each failing test also yields output similar to the following (with --nocapture):
Note that this output is for the test
test_print_generic_struct
but the failure (and all of them) mentions problems with the new codetest_print_inner_struct
, so the problem is probably that all the tests load the same code and are rejected due to invalid bytecode in a different method in the module.Expected Behavior
Newly added test fails, but not existing tests. Or we get a more informative error message.
The text was updated successfully, but these errors were encountered: