Revert "cmd/cgo/internal/testsanitizers: fix msan test failing with clang >= 16"

This reverts commit https://go.dev/cl/c/go/+/549297

Reason for revert: breaks clang builder

Change-Id: I2321dec9bc1fc20dfafa8a984303b0b5710f8aac
Reviewed-on: https://go-review.googlesource.com/c/go/+/550779
Auto-Submit: Than McIntosh <thanm@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Mauri de Souza Meneguzzo <mauri870@gmail.com>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
This commit is contained in:
Than McIntosh 2023-12-18 21:11:13 +00:00 committed by Gopher Robot
parent 7058f09a8b
commit c564d4ae08
2 changed files with 1 additions and 11 deletions

View File

@ -71,10 +71,7 @@ func TestMSAN(t *testing.T) {
defer dir.RemoveAll(t)
outPath := dir.Join(name)
buildcmd := config.goCmdWithExperiments("build", []string{"-o", outPath, srcPath(tc.src)}, tc.experiments)
// allow tests to define -f flags in CGO_CFLAGS
replaceEnv(buildcmd, "CGO_CFLAGS_ALLOW", "-f.*")
mustRun(t, buildcmd)
mustRun(t, config.goCmdWithExperiments("build", []string{"-o", outPath, srcPath(tc.src)}, tc.experiments))
cmd := hangProneCmd(outPath)
if tc.wantErr {

View File

@ -5,13 +5,6 @@
package main
/*
// For clang >= 16, uninitialized memory is more aggressively reported.
// Restore the old behavior for this particular test as it relies on
// uninitialized variables. See #64616
#if __clang_major__ >= 16
#cgo CFLAGS: -fno-sanitize-memory-param-retval
#endif
#include <pthread.h>
#include <signal.h>
#include <stdint.h>