Skip to content

Commit d8f4af3

Browse files
committed
profile
1 parent 634175c commit d8f4af3

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+17
-3965
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,6 @@ Cloud/GCE/config.sh
1313
# node.js dependencies, used by the JavaScript parser for the FuzzIL compiler
1414
node_modules
1515
package-lock.json
16+
17+
# results dir and workerd corpus
18+
workerd*

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -248,6 +248,12 @@ Special thanks to all users of Fuzzilli who have reported bugs found by it!
248248
- [CVE-2020-1912](https://www.facebook.com/security/advisories/cve-2020-1912): Memory corruption when executing lazily compiled inner generator functions
249249
- [CVE-2020-1914](https://www.facebook.com/security/advisories/cve-2020-1914): Bytecode corruption when handling the SaveGeneratorLong instruction
250250

251+
#### [Workerd](https://github.com/cloudflare/workerd)
252+
- [PR 4793](https://github.com/cloudflare/workerd/pull/4793): OOB write in writeSync due to missing bounds check
253+
- [PR 4845](https://github.com/cloudflare/workerd/pull/4845): UAF in VFS file clone handling
254+
- [PR 4828](https://github.com/cloudflare/workerd/pull/4828): Segmentation fault on undefined keys in DH crypto API.
255+
- [PR 4853](https://github.com/cloudflare/workerd/pull/4853): Workerd hits illegal instruction due to missing branch in FileSystemModule::setLastModified.
256+
251257
## Disclaimer
252258

253259
This is not an officially supported Google product.

Sources/Fuzzilli/Compiler/JavaScriptParser.swift

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@ public class JavaScriptParser {
4343
do {
4444
try runParserScript(withArguments: [])
4545
} catch {
46-
4746
return nil
4847
}
4948
}

Sources/Fuzzilli/Fuzzer.swift

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -426,6 +426,7 @@ public class Fuzzer {
426426
}
427427

428428
let execution = execute(program, purpose: .programImport)
429+
429430
var wasImported = false
430431
switch execution.outcome {
431432
case .crashed(let termsig):
@@ -668,15 +669,6 @@ public class Fuzzer {
668669
let execution = runner.run(script, withTimeout: timeout ?? config.timeout)
669670
dispatchEvent(events.PostExecute, data: execution)
670671

671-
//Stdout
672-
// if !execution.stdout.isEmpty {
673-
// print(execution.stdout)
674-
// }
675-
676-
// if !execution.stderr.isEmpty {
677-
// print(execution.stderr)
678-
// }
679-
680672
return execution
681673
}
682674

Sources/FuzzilliCli/Profiles/WorkerdProfile.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import Fuzzilli
1616

1717
let workerdProfile = Profile(
1818
processArgs: { randomize in
19-
["--reprl-fuzzilli"]
19+
["fuzzilli","/home/mschwarzl/projects/workerd/samples/reprl/config-full.capnp","--experimental"]
2020
},
2121

2222
processEnv: [:],

Sources/REPRLRun/main.swift

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ import Foundation
22
import libreprl
33

44
func convertToCArray(_ array: [String]) -> UnsafeMutablePointer<UnsafePointer<Int8>?> {
5-
print("Converting array to C array: \(array)")
65
let buffer = UnsafeMutablePointer<UnsafePointer<Int8>?>.allocate(capacity: array.count + 1)
76
for (i, str) in array.enumerated() {
87
buffer[i] = UnsafePointer(str.withCString(strdup))
@@ -29,7 +28,6 @@ if CommandLine.arguments.count < 2 {
2928
exit(0)
3029
}
3130

32-
print("Creating REPRL context...")
3331
let ctx = libreprl.reprl_create_context()
3432
if ctx == nil {
3533
print("Failed to create REPRL context??")
@@ -39,7 +37,6 @@ if ctx == nil {
3937
let argv = convertToCArray(Array(CommandLine.arguments[1...]))
4038
let envp = convertToCArray([])
4139

42-
print("Initializing REPRL context with argv: \(CommandLine.arguments[1...])")
4340
if reprl_initialize_context(ctx, argv, envp, /* capture_stdout: */ 1, /* capture stderr: */ 1) != 0 {
4441
print("Failed to initialize REPRL context: \(String(cString: reprl_get_last_error(ctx)))")
4542
printREPRLOutput(ctx)
@@ -86,11 +83,14 @@ func runREPRLTests() {
8683

8784
expect_success("42")
8885
expect_failure("throw 42")
89-
86+
87+
// Verify that existing state is property reset between executions
9088
expect_success("globalProp = 42; Object.prototype.foo = \"bar\";")
9189
expect_success("if (typeof(globalProp) !== 'undefined') throw 'failure'")
9290
expect_success("if (typeof(({}).foo) !== 'undefined') throw 'failure'")
9391

92+
// Verify that rejected promises are properly reset between executions
93+
// Only if async functions are available
9494
if execute("async function foo() {}").status == 0 {
9595
expect_failure("async function fail() { throw 42; }; fail()")
9696
expect_success("42")
@@ -105,15 +105,14 @@ func runREPRLTests() {
105105
}
106106
}
107107

108-
print("Checking if REPRL works...")
108+
// Check whether REPRL works at all
109109
if execute("").status != 0 {
110110
print("Initial script execution failed, REPRL support does not appear to be working")
111111
printREPRLOutput(ctx)
112112
exit(1)
113-
} else {
114-
print("Initial REPRL check passed.")
115113
}
116114

115+
// Run a couple of tests now
117116
runREPRLTests()
118117

119118
print("Enter code to run, then hit enter to execute it")
@@ -124,7 +123,6 @@ while true {
124123
break
125124
}
126125

127-
print("Executing user input code...")
128126
let (status, exec_time) = execute(code)
129127

130128
if status < 0 {

workerd-corpus-fs/append-operations.js

Lines changed: 0 additions & 14 deletions
This file was deleted.

workerd-corpus-fs/async-callbacks.js

Lines changed: 0 additions & 17 deletions
This file was deleted.

workerd-corpus-fs/basic-file-ops.js

Lines changed: 0 additions & 11 deletions
This file was deleted.

workerd-corpus-fs/boundary-conditions.js

Lines changed: 0 additions & 10 deletions
This file was deleted.

0 commit comments

Comments
 (0)