Commit db1fef7b authored by Ian Lance Taylor's avatar Ian Lance Taylor

cmd/go: for -msan build runtime/cgo with -fsanitize=memory

The go tool used to avoid passing -fsanitize=memory when building
runtime/cgo. That was originally to avoid an msan error, but that error
was fixed anyhow for issue #13815. And building runtime/cgo with
-fsanitize=memory corrects the handling of the context traceback
function when the traceback function itself is built with
-fsanitize=memory.

Change-Id: I4bf5c3d21de6b2eb540600435ae47f5820d17464
Reviewed-on: https://go-review.googlesource.com/24855
Run-TryBot: Ian Lance Taylor <iant@golang.org>
Reviewed-by: default avatarJoe Tsai <thebrokentoaster@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
parent bd9aa981
......@@ -3195,7 +3195,7 @@ func (b *builder) cgo(p *Package, cgoExe, obj string, pcCFLAGS, pcLDFLAGS, cgofi
}
}
if buildMSan && p.ImportPath != "runtime/cgo" {
if buildMSan {
cgoCFLAGS = append([]string{"-fsanitize=memory"}, cgoCFLAGS...)
cgoLDFLAGS = append([]string{"-fsanitize=memory"}, cgoLDFLAGS...)
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment