From 3694f3369276d072d3eccd03b1855b18d3ecee18 Mon Sep 17 00:00:00 2001 From: David Finkel Date: Wed, 4 Mar 2026 16:34:24 -0500 Subject: runtime: GODEBUG=tracebacklabels=1 for 1.27+ https://go.dev/cl/742580 updated the goroutine label format in tracebacks to only quote the values under some circumstances, and use a more broadly acceptable format. Flip the GODEBUG=tracebacklabels default for go 1.27+ modules. Notably, tracebacklabels is marked as Opaque to avoid some diciness in maintaining a usage metric in signal handlers, etc. (where mutex acquisition may be problematic) Also, update the go 1.27 release notes to call out the new feature. Updates #76349 Change-Id: Iedd3f6b17d83e99da20365b952a565022d20ff13 Reviewed-on: https://go-review.googlesource.com/c/go/+/751580 LUCI-TryBot-Result: Go LUCI Auto-Submit: Alan Donovan Reviewed-by: Alan Donovan Reviewed-by: Mark Freeman --- src/runtime/runtime1.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/runtime/runtime1.go') diff --git a/src/runtime/runtime1.go b/src/runtime/runtime1.go index d5bce17563..10754eee1c 100644 --- a/src/runtime/runtime1.go +++ b/src/runtime/runtime1.go @@ -398,7 +398,7 @@ var dbgvars = []*dbgVar{ {name: "traceallocfree", atomic: &debug.traceallocfree}, {name: "tracecheckstackownership", value: &debug.traceCheckStackOwnership}, {name: "tracebackancestors", value: &debug.tracebackancestors}, - {name: "tracebacklabels", atomic: &debug.tracebacklabels, def: 0}, + {name: "tracebacklabels", atomic: &debug.tracebacklabels, def: 1}, {name: "tracefpunwindoff", value: &debug.tracefpunwindoff}, {name: "updatemaxprocs", value: &debug.updatemaxprocs, def: 1}, } -- cgit v1.3-6-g1900