-
Notifications
You must be signed in to change notification settings - Fork 757
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
[EH] Fuzz exnref in tables #7289
base: main
Are you sure you want to change the base?
Conversation
This depends on #7290 but otherwise looks stable under fuzzing. |
src/tools/fuzzing/fuzzing.cpp
Outdated
index = make(table->addressType); | ||
} else { | ||
index = builder.makeConst( | ||
Literal::makeFromInt32(table->initial, table->addressType)); |
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.
Do we only get from the initial index? (The same for table.set
)
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.
Good catch! This should be upTo(table->initial)
. Fixed.
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.
So we don't support table.grow
in the fuzzer and the size is the same as initial
?
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.
We should add table.grow
support, but yeah, for now the size will be fixed.
if (type.getHeapType() == HeapType::exn) { | ||
return makeTableGet(exnrefTableName); | ||
} else { | ||
return makeTableGet(funcrefTableName); |
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.
Is it always HeapType::func
here? Can we assert? (The same for makeTableSet
)
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.
Good idea, I added asserts.
CI errors here might be fixed by #7288 |
table.get
Opening as draft as I see some fuzzer errors that need to be fixed.