]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/cgo/internal/testsanitizers: bump GCC version for asan location checking
authorThan McIntosh <thanm@golang.org>
Sun, 9 Mar 2025 12:59:45 +0000 (08:59 -0400)
committerThan McIntosh <thanm@golang.org>
Mon, 10 Mar 2025 16:33:18 +0000 (09:33 -0700)
Require GCC 11 or greater to turn on the location checking portion of
the asan tests in this directory; the copy of libasan.so.6 shipped
with GCC 10 doesn't seem to properly digest the new DWARF 5 being
generated by the Go compiler+linker.

Updates #72752.

Change-Id: I92718c112df844d9333c4c798cddaae95665feb2
Reviewed-on: https://go-review.googlesource.com/c/go/+/656175
Reviewed-by: Cherry Mui <cherryyz@google.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>

src/cmd/cgo/internal/testsanitizers/cc_test.go

index fa0105b11a5d6c1291d1968540590bad8ea6e95c..7233b6a7756b88c78a90983c4fda44c06750fd0a 100644 (file)
@@ -266,7 +266,12 @@ func compilerSupportsLocation() bool {
        }
        switch compiler.name {
        case "gcc":
-               return compiler.major >= 10
+               // TODO(72752): the asan runtime support library
+               // (libasan.so.6) shipped with GCC 10 has problems digesting
+               // version 5 DWARF produced by the Go toolchain. Disable
+               // location checking if gcc is not sufficiently up to date in
+               // this case.
+               return compiler.major > 10
        case "clang":
                // TODO(65606): The clang toolchain on the LUCI builders is not built against
                // zlib, the ASAN runtime can't actually symbolize its own stack trace. Once