diff options
| author | cui fliter <imcusg@gmail.com> | 2024-03-22 23:31:44 +0800 |
|---|---|---|
| committer | Gopher Robot <gobot@golang.org> | 2024-03-26 19:58:28 +0000 |
| commit | 1e12eab8705d1d8d7472be9147a39caa1c8380db (patch) | |
| tree | cde9e173c3e757516f56f9e66c41065513738832 /src/internal/fuzz | |
| parent | 4217877670e94b88ddd1ee1041b31d5825b08e2a (diff) | |
| download | go-1e12eab8705d1d8d7472be9147a39caa1c8380db.tar.xz | |
all: fix a large number of comments
Partial typo corrections, following https://go.dev/wiki/Spelling
Change-Id: I2357906ff2ea04305c6357418e4e9556e20375d1
Reviewed-on: https://go-review.googlesource.com/c/go/+/573776
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Than McIntosh <thanm@google.com>
Run-TryBot: shuang cui <imcusg@gmail.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Auto-Submit: Ian Lance Taylor <iant@google.com>
Diffstat (limited to 'src/internal/fuzz')
| -rw-r--r-- | src/internal/fuzz/fuzz.go | 8 | ||||
| -rw-r--r-- | src/internal/fuzz/worker.go | 8 |
2 files changed, 8 insertions, 8 deletions
diff --git a/src/internal/fuzz/fuzz.go b/src/internal/fuzz/fuzz.go index fb4e1d3705..e406c8c400 100644 --- a/src/internal/fuzz/fuzz.go +++ b/src/internal/fuzz/fuzz.go @@ -196,7 +196,7 @@ func CoordinateFuzzing(ctx context.Context, opts CoordinateFuzzingOpts) (err err // Main event loop. // Do not return until all workers have terminated. We avoid a deadlock by - // receiving messages from workers even after ctx is cancelled. + // receiving messages from workers even after ctx is canceled. activeWorkers := len(workers) statTicker := time.NewTicker(3 * time.Second) defer statTicker.Stop() @@ -223,8 +223,8 @@ func CoordinateFuzzing(ctx context.Context, opts CoordinateFuzzingOpts) (err err select { case <-doneC: - // Interrupted, cancelled, or timed out. - // stop sets doneC to nil so we don't busy wait here. + // Interrupted, canceled, or timed out. + // stop sets doneC to nil, so we don't busy wait here. stop(ctx.Err()) case err := <-errC: @@ -653,7 +653,7 @@ type coordinator struct { } func newCoordinator(opts CoordinateFuzzingOpts) (*coordinator, error) { - // Make sure all of the seed corpus has marshalled data. + // Make sure all the seed corpus has marshaled data. for i := range opts.Seed { if opts.Seed[i].Data == nil && opts.Seed[i].Values != nil { opts.Seed[i].Data = marshalCorpusFile(opts.Seed[i].Values...) diff --git a/src/internal/fuzz/worker.go b/src/internal/fuzz/worker.go index c952670995..e8a7421778 100644 --- a/src/internal/fuzz/worker.go +++ b/src/internal/fuzz/worker.go @@ -89,7 +89,7 @@ func (w *worker) cleanup() error { // coordinate runs the test binary to perform fuzzing. // -// coordinate loops until ctx is cancelled or a fatal error is encountered. +// coordinate loops until ctx is canceled or a fatal error is encountered. // If a test process terminates unexpectedly while fuzzing, coordinate will // attempt to restart and continue unless the termination can be attributed // to an interruption (from a timer or the user). @@ -1026,7 +1026,7 @@ func (wc *workerClient) minimize(ctx context.Context, entryIn CorpusEntry, args return entryIn, minimizeResponse{}, retErr } // An unrecoverable error occurred during minimization. mem now - // holds the raw, unmarshalled bytes of entryIn.Values[i] that + // holds the raw, unmarshaled bytes of entryIn.Values[i] that // caused the error. switch entryOut.Values[i].(type) { case string: @@ -1148,7 +1148,7 @@ func (wc *workerClient) ping(ctx context.Context) error { } // callLocked sends an RPC from the coordinator to the worker process and waits -// for the response. The callLocked may be cancelled with ctx. +// for the response. The callLocked may be canceled with ctx. func (wc *workerClient) callLocked(ctx context.Context, c call, resp any) (err error) { enc := json.NewEncoder(wc.fuzzIn) dec := json.NewDecoder(&contextReader{ctx: ctx, r: wc.fuzzOut}) @@ -1158,7 +1158,7 @@ func (wc *workerClient) callLocked(ctx context.Context, c call, resp any) (err e return dec.Decode(resp) } -// contextReader wraps a Reader with a Context. If the context is cancelled +// contextReader wraps a Reader with a Context. If the context is canceled // while the underlying reader is blocked, Read returns immediately. // // This is useful for reading from a pipe. Closing a pipe file descriptor does |
