-
Notifications
You must be signed in to change notification settings - Fork 337
Mschwarzl/workerd #521
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
Open
mschwarzl
wants to merge
10
commits into
googleprojectzero:main
Choose a base branch
from
mschwarzl:mschwarzl/workerd
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+81
−0
Open
Mschwarzl/workerd #521
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
c4a8cce
some modifications for easier debugging
mschwarzl a11554c
profile
mschwarzl ae99c0e
add parser support for imports/exports in code
mschwarzl 20850d4
allow await outside functions
mschwarzl 8a3db83
support for top-level awaits
mschwarzl b974cfb
corpus
mschwarzl 50dce70
profile
mschwarzl b40e2c6
Update README.md
mschwarzl 946c2dc
Update WorkerdProfile.swift
mschwarzl b556961
added ASAN crasheds
mschwarzl File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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 |
---|---|---|
@@ -0,0 +1,62 @@ | ||
// Copyright 2025 Google LLC | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// https://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
|
||
import Fuzzilli | ||
|
||
let workerdProfile = Profile( | ||
processArgs: { randomize in ["fuzzilli"] }, | ||
|
||
processEnv: ["ASAN_OPTIONS" : "abort_on_error=1:symbolize=false", "UBSAN_OPTIONS" : "abort_on_error=1:symbolize=false"], | ||
|
||
maxExecsBeforeRespawn: 1000, | ||
|
||
timeout: 250, | ||
|
||
codePrefix: """ | ||
""", | ||
|
||
codeSuffix: """ | ||
""", | ||
|
||
ecmaVersion: ECMAScriptVersion.es5, | ||
|
||
startupTests: [ | ||
// Check that the fuzzilli integration is available. | ||
("fuzzilli('FUZZILLI_PRINT', 'test')", .shouldSucceed), | ||
|
||
// Check that common crash types are detected. | ||
("fuzzilli('FUZZILLI_CRASH', 0)", .shouldCrash), | ||
("fuzzilli('FUZZILLI_CRASH', 1)", .shouldCrash), | ||
("fuzzilli('FUZZILLI_CRASH', 2)", .shouldCrash), | ||
("fuzzilli('FUZZILLI_CRASH', 3)", .shouldCrash), | ||
("fuzzilli('FUZZILLI_CRASH', 4)", .shouldCrash), | ||
// doesn't crash in workerd | ||
//("fuzzilli('FUZZILLI_CRASH', 5)", .shouldCrash), | ||
("fuzzilli('FUZZILLI_CRASH', 6)", .shouldCrash), | ||
], | ||
|
||
additionalCodeGenerators: [], | ||
|
||
additionalProgramTemplates: WeightedList<ProgramTemplate>([]), | ||
|
||
disabledCodeGenerators: [], | ||
|
||
disabledMutators: [], | ||
|
||
additionalBuiltins: [:], | ||
|
||
additionalObjectGroups: [], | ||
|
||
optionalPostProcessor: nil | ||
) |
This file contains hidden or 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 |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# Target: workerd | ||
|
||
To build workerd for fuzzing: | ||
|
||
0. Clone [workerd](https://github.com/cloudflare/workerd/) | ||
1. Follow the instructions [here](https://github.com/cloudflare/workerd/blob/main/README.md#getting-started) | ||
2. Run the fuzzbuild.sh script in the workerd root directory to build workerd with the fuzzili configuration | ||
3. Test if REPRL works: | ||
`swift run REPRLRun <path-to-workerd> fuzzilli <path-to-capnp-config> --experimental` | ||
4. Run Fuzzilli with a workerd config (See samples/reprl): | ||
`swift run -c release FuzzilliCli --inspect=all --profile=workerd <path-to-workerd> --additionalArguments=<path-to-workerd-config>,--experimental` |
This file contains hidden or 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 |
---|---|---|
@@ -0,0 +1 @@ | ||
bazel --nohome_rc --nosystem_rc build --config=fuzzilli //src/workerd/server:workerd --action_env=CC=clang-19 |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 obvious what
capnp-config
is after doing the previous steps?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.
It is if you look through the spec but there'll be a dedicated config in the workerd repository once I get https://github.com/cloudflare/workerd/pulls merged, I can update the description here pointing to the exact file.