]> Cypherpunks.ru repositories - gostls13.git/commit
[release-branch.go1.20] cmd/cgo: error out if the source path used in line directives...
authorBryan C. Mills <bcmills@google.com>
Mon, 15 May 2023 16:13:25 +0000 (12:13 -0400)
committerGopher Robot <gobot@golang.org>
Tue, 20 Jun 2023 00:34:48 +0000 (00:34 +0000)
commit471904821134ee52c289cc5b17630313d812c32a
tree56e3143c5f6690f2358e2e3d220839240af881c7
parent6c606fc1915a00098aec157cbc03da59bb7d19ee
[release-branch.go1.20] cmd/cgo: error out if the source path used in line directives would contain a newline

cmd/cgo uses '//line' directives to map generated source
files back to the original source file and line nmubers.

The line directives have no way to escape newline characters,
so cmd/cgo must not be used if the line directives would contain
such characters.

Updates #60516.
Updates #60167.

Change-Id: I8581cea74d6c08f82e86ed87127e81252e1bf78c
Reviewed-on: https://go-review.googlesource.com/c/go/+/501576
TryBot-Result: Gopher Robot <gobot@golang.org>
Auto-Submit: Bryan Mills <bcmills@google.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Run-TryBot: Bryan Mills <bcmills@google.com>
(cherry picked from commit c48228312e7fdd9580078f58f5f4a287ce1185d5)
Reviewed-on: https://go-review.googlesource.com/c/go/+/501817
Auto-Submit: Dmitri Shuralyov <dmitshur@google.com>
src/cmd/cgo/ast.go
src/cmd/cgo/main.go
src/cmd/cgo/out.go
src/cmd/go/testdata/script/build_cwd_newline.txt