diff options
| author | Jay Conrod <jayconrod@google.com> | 2021-01-22 14:27:24 -0500 |
|---|---|---|
| committer | Jay Conrod <jayconrod@google.com> | 2021-01-22 21:16:10 +0000 |
| commit | a2cef9b544708ecae983ed8836ee2425a28aab68 (patch) | |
| tree | 80ebd937e34ba17a9e66005f5eadf9ee441f6bc6 /src/runtime/proc.go | |
| parent | dab3e5affefb7e0b157ad27fe4797c4c6f3c4ea6 (diff) | |
| download | go-a2cef9b544708ecae983ed8836ee2425a28aab68.tar.xz | |
cmd/go: don't lookup the path for CC when invoking cgo
Previously, if CC was a path without separators (like gcc or clang),
we'd look it up in PATH in cmd/go using internal/execabs.LookPath,
then pass the resolved path to cgo in CC.
This caused a regression: if the directory in PATH containing CC has a
space, cgo splits it and interprets it as multiple arguments.
With this change, cmd/go no longer resolves CC before invoking
cgo. cgo does the path lookup on each invocation. This reverts the
security fix CL 284780, but that was redundant with the addition of
internal/execabs (CL 955304), which still protects us.
Fixes #43808
Updates #41400
Change-Id: I65d91a1e303856df8653881eb6e2e75a3bf95c49
Reviewed-on: https://go-review.googlesource.com/c/go/+/285873
Trust: Jay Conrod <jayconrod@google.com>
Run-TryBot: Jay Conrod <jayconrod@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Bryan C. Mills <bcmills@google.com>
Diffstat (limited to 'src/runtime/proc.go')
0 files changed, 0 insertions, 0 deletions
