commit | 62c7e578f1a7275d934c99dd48715525bd52b17e | [log] [tgz] |
---|---|---|
author | Russ Cox <rsc@golang.org> | Mon Jun 05 16:24:29 2023 -0400 |
committer | Russ Cox <rsc@golang.org> | Tue Jun 06 12:29:20 2023 +0000 |
tree | a6511b3b83472556e1c290bd15aaec9f90048c83 | |
parent | 2a1c06a60797e734ab13afef967c60867445e1e5 [diff] |
sumdb: handle panic from c.ReadRemote during ReadTiles The go command tests use a network stack that sometimes panics during read. This code was assuming a network stack that returns errors instead. If a tile-reading goroutine panicked, ReadTiles considered it done with data, err = nil, nil, and then there was a race between ReadTiles failing with an error about a suspiciously short tile and the panicking goroutine getting to run and bring down the entire program. Remove the race by converting the panic into an error during ReadTiles. For a test in golang/go#57001. Change-Id: I9b18a244238e67c27a15b93f8397bf3ab44b06e6 Reviewed-on: https://go-review.googlesource.com/c/mod/+/501035 Run-TryBot: Russ Cox <rsc@golang.org> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Michael Matloob <matloob@golang.org>
This repository holds packages for writing tools that work directly with Go module mechanics. That is, it is for direct manipulation of Go modules themselves.
It is NOT about supporting general development tools that need to do things like load packages in module mode. That use case, where modules are incidental rather than the focus, should remain in x/tools, specifically x/tools/go/packages.
The specific case of loading packages should still be done by invoking the go command, which remains the single point of truth for package loading algorithms.