diff options
| author | Michael Pratt <mpratt@google.com> | 2023-10-02 15:55:29 -0400 |
|---|---|---|
| committer | Gopher Robot <gobot@golang.org> | 2023-10-02 23:19:38 +0000 |
| commit | 122b35e838af8ab9c0d5027741d6f73cef09f966 (patch) | |
| tree | adbd170fe1801b053b0fb509fb1495ccfb5a8304 /src/database/sql/sql.go | |
| parent | ef3171c5eb4bc22b79690afb36bbb1e681473ea0 (diff) | |
| download | go-122b35e838af8ab9c0d5027741d6f73cef09f966.tar.xz | |
syscall: copy original rlimit before modifying
CL 531516 converted origRlimitNofile from an atomic.Value to
atomic.Pointer[Rlimit]. i.e., it changed from storing a value to storing
a pointer.
After storing a pointer to lim, the remainder of this function
immediately modifies it, thus mutating the value pointer to by
origRlimitNofile (and thus defeating the point of origRlimitNofile).
This broke the android-amd64-emu builder because it is (apparently) the
only builder where the original RLIMIT_NOFILE Cur != Max.
TestRlimitRestored is skipped on every other builder.
Change-Id: I12076350eeddfd221823ad651e7e7eca59d2bdcd
Reviewed-on: https://go-review.googlesource.com/c/go/+/532100
Run-TryBot: Michael Pratt <mpratt@google.com>
Auto-Submit: Michael Pratt <mpratt@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Diffstat (limited to 'src/database/sql/sql.go')
0 files changed, 0 insertions, 0 deletions
