You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Make it possible to import .js files that throw an exception
Previously, we wouldn't import those files as we require all samples in
the corpus to execute successfully. With this change, we simply try to
wrap all failing programs in a big try-catch block during corpus import,
then try importing them again. In the future we could improve this
mechanism to for example determine exactly which instruction causes the
exception and then either remove this instruction or wrap (only) it in a
try-catch. But for now, this simple change already allows us to import
~30% more programs from V8's regression tests.
Drive-By: add some more functions to filteredFunctionsForCompiler.
Copy file name to clipboardExpand all lines: Sources/FuzzILTool/main.swift
+6-1Lines changed: 6 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -27,10 +27,15 @@ let fuzzILLifter = FuzzILLifter()
27
27
// Default list of functions that are filtered out during compilation. These are functions that may be used in testcases but which do not influence the test's behaviour and so should be omitted for fuzzing.
28
28
// The functions can use the wildcard '*' character as _last_ character, in which case a prefix match will be performed.
29
29
letfilteredFunctionsForCompiler=[
30
+
// Functions used in V8's test suite
30
31
"assert*",
31
32
"print*",
33
+
// Functions used in Mozilla's test suite
34
+
"startTest",
32
35
"enterFunc",
33
-
"startTest"
36
+
"exitFunc",
37
+
"report*",
38
+
"options*",
34
39
]
35
40
36
41
// Loads a serialized FuzzIL program from the given file
logger.info("\(currentCorpusImportJob.numberOfProgramsThatExecutedSuccessfullyDuringImport)/\(currentCorpusImportJob.totalNumberOfProgramsToImport) programs executed successfully during import")
673
+
logger.info("\(currentCorpusImportJob.numberOfProgramsThatNeededFixup)/\(currentCorpusImportJob.totalNumberOfProgramsToImport) programs needed fixup during import (wrapping in try-catch)")
656
674
logger.info("\(currentCorpusImportJob.numberOfProgramsThatTimedOutDuringImport)/\(currentCorpusImportJob.totalNumberOfProgramsToImport) programs timed out during import")
657
675
logger.info("\(currentCorpusImportJob.numberOfProgramsThatFailedDuringImport)/\(currentCorpusImportJob.totalNumberOfProgramsToImport) programs failed to execute during import")
658
676
logger.info("Corpus now contains \(corpus.size) programs")
0 commit comments