-
Notifications
You must be signed in to change notification settings - Fork 38
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
Enable "too many results" stack height validation #356
Conversation
@@ -160,7 +180,7 @@ TEST(validation_stack, loop_with_result_stack_underflow) | |||
EXPECT_THROW_MESSAGE(parse(wasm), validation_error, "stack underflow"); | |||
} | |||
|
|||
TEST(validation_stack, DISABLED_loop_too_many_results) | |||
TEST(validation_stack, loop_too_many_results) |
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.
Another test suggestion, not sure if already exists: unreachable insrtuction after br
that would push extra result, but should be valid, as it's unreachable.
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.
This is actually invalid. You cannot have additional items in polymorphic stack.
2da5e2c
to
71ef8ae
Compare
71ef8ae
to
5953401
Compare
89039ef
to
80b015e
Compare
Codecov Report
@@ Coverage Diff @@
## master #356 +/- ##
==========================================
+ Coverage 98.94% 99.11% +0.17%
==========================================
Files 42 42
Lines 12317 12357 +40
==========================================
+ Hits 12187 12248 +61
+ Misses 130 109 -21 |
@@ -252,8 +252,8 @@ jobs: | |||
- benchmark: | |||
min_time: "0.01" | |||
- spectest: | |||
expected_passed: 4903 | |||
expected_failed: 529 | |||
expected_passed: 4997 |
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.
wow nice increase
My PRs are getting like 2 new tests passed 😖
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.
This is part of type validation, so I expect it has a lot of test cases.
@@ -482,6 +502,33 @@ TEST(validation_stack, unreachable_call_indirect) | |||
parse(wasm); | |||
} | |||
|
|||
TEST(validation_stack, unreachable_too_many_results) | |||
{ | |||
// TODO: These are actually examples of invalid wasm. |
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.
Then maybe better to make it disabled tests expecting exception?
80b015e
to
553a7d6
Compare
Requires #355.