Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 4 additions & 6 deletions src/tools/fuzzing/fuzzing.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2579,12 +2579,11 @@ void TranslateToFuzzReader::mutateJSBoundary() {

// Refine.
auto lub = paramLUBs[func->name];
auto lubType = lub.getLUB();
// Either the LUB has the right data shape, or nothing was noted (this is
// unreachable).
assert(oldParams.size() == lubType.size() || !lub.noted());
assert(oldParams.size() == lub.getLUB().size() || !lub.noted());
std::vector<Type> newParams;
for (Index i = 0; i < lubType.size(); i++) {
for (Index i = 0; i < oldParams.size(); i++) {
newParams.push_back(maybeRefineIndex(oldParams, lub, i));
}
func->setParams(Type(newParams));
Expand All @@ -2608,10 +2607,9 @@ void TranslateToFuzzReader::mutateJSBoundary() {

// Refine.
auto lub = LUB::getResultsLUB(func, wasm);
auto lubType = lub.getLUB();
assert(oldResults.size() == lubType.size() || !lub.noted());
assert(oldResults.size() == lub.getLUB().size() || !lub.noted());
std::vector<Type> newResults;
for (Index i = 0; i < lubType.size(); i++) {
for (Index i = 0; i < oldResults.size(); i++) {
newResults.push_back(maybeRefineIndex(oldResults, lub, i));
}
func->setResults(Type(newResults));
Expand Down
Loading