]> Cypherpunks repositories - gostls13.git/commit
[release-branch.go1.19] 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)
committerMichael Pratt <mpratt@google.com>
Tue, 13 Jun 2023 19:59:45 +0000 (19:59 +0000)
commit516ef2da14ac166984f0945df88b2bb3676a5064
tree1a8df433f510a27034541fc91af8b7a1cf8811cc
parent0f7675d910cf726f91189459fe7bfa3002b94c48
[release-branch.go1.19] 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 #60515.
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/+/501821
TryBot-Bypass: 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