]> Cypherpunks repositories - gostls13.git/commit
cmd/cgo: error out if the source path used in line directives would contain a newline
authorBryan C. Mills <bcmills@google.com>
Mon, 15 May 2023 16:13:25 +0000 (12:13 -0400)
committerGopher Robot <gobot@golang.org>
Wed, 7 Jun 2023 16:54:27 +0000 (16:54 +0000)
commitc48228312e7fdd9580078f58f5f4a287ce1185d5
tree9917ac616286f06605b62bf1a79bd8779406e0ac
parente2b1c0baa600968345d18c6ab339f07b09763da1
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 #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>
src/cmd/cgo/ast.go
src/cmd/cgo/main.go
src/cmd/cgo/out.go
src/cmd/go/testdata/script/build_cwd_newline.txt