-
Notifications
You must be signed in to change notification settings - Fork 745
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Strings] Work around ref.cast not working on string views, and add f…
…uzzing (#6549) As suggested in #6434 (comment) , lower ref.cast of string views to ref.as_non_null in binary writing. It is a simple hack that avoids the problem of V8 not allowing them to be cast. Add fuzzing support for the last three core string operations, after which that problem becomes very frequent. Also add yet another makeTrappingRefUse that was missing in that fuzzer code.
- Loading branch information
Showing
6 changed files
with
163 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
72 changes: 37 additions & 35 deletions
72
test/passes/translate-to-fuzz_all-features_metrics_noprint.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,45 +1,47 @@ | ||
total | ||
[exports] : 4 | ||
[funcs] : 6 | ||
[exports] : 5 | ||
[funcs] : 7 | ||
[globals] : 14 | ||
[imports] : 5 | ||
[memories] : 1 | ||
[memory-data] : 20 | ||
[table-data] : 1 | ||
[table-data] : 2 | ||
[tables] : 1 | ||
[tags] : 1 | ||
[total] : 533 | ||
[vars] : 24 | ||
ArrayNew : 11 | ||
ArrayNewFixed : 2 | ||
AtomicFence : 1 | ||
Binary : 79 | ||
Block : 57 | ||
Break : 6 | ||
Call : 8 | ||
Const : 137 | ||
Drop : 1 | ||
GlobalGet : 28 | ||
GlobalSet : 28 | ||
If : 15 | ||
[total] : 467 | ||
[vars] : 40 | ||
ArrayGet : 1 | ||
ArrayLen : 1 | ||
ArrayNew : 6 | ||
ArrayNewFixed : 1 | ||
Binary : 67 | ||
Block : 44 | ||
Break : 5 | ||
Call : 21 | ||
Const : 106 | ||
Drop : 7 | ||
GlobalGet : 20 | ||
GlobalSet : 18 | ||
If : 14 | ||
Load : 17 | ||
LocalGet : 40 | ||
LocalSet : 23 | ||
Loop : 9 | ||
Nop : 4 | ||
LocalGet : 45 | ||
LocalSet : 28 | ||
Loop : 3 | ||
MemoryFill : 1 | ||
Nop : 5 | ||
RefAs : 1 | ||
RefFunc : 2 | ||
RefI31 : 2 | ||
RefIsNull : 1 | ||
RefNull : 5 | ||
Return : 2 | ||
SIMDExtract : 2 | ||
Select : 1 | ||
Store : 2 | ||
StringConst : 4 | ||
RefCast : 1 | ||
RefEq : 1 | ||
RefFunc : 3 | ||
RefI31 : 4 | ||
RefNull : 3 | ||
Return : 3 | ||
Select : 2 | ||
Store : 1 | ||
StringConst : 3 | ||
StringEncode : 1 | ||
StringEq : 1 | ||
StructGet : 1 | ||
StructNew : 9 | ||
TupleMake : 4 | ||
Unary : 15 | ||
Unreachable : 15 | ||
StructNew : 5 | ||
TupleMake : 5 | ||
Unary : 13 | ||
Unreachable : 10 |