Text file
src/cmd/go/testdata/script/godebug_decoratemappings_124.txt
1 # Go 1.24 module should disable decoratemappings.
2 go list -f '{{.Module.GoVersion}} {{.DefaultGODEBUG}}'
3 stdout decoratemappings=0
4
5 [!GOOS:linux] skip
6
7 # Programs in Go 1.24 module should never see annotations. This ensures that
8 # the runtime has not overridden the default.
9 go run .
10
11 -- go.mod --
12 go 1.24
13 module m
14
15 -- main.go --
16 package main
17
18 import (
19 "log"
20 "os"
21 "strings"
22 )
23
24 func main() {
25 b, err := os.ReadFile("/proc/self/maps")
26 if err != nil {
27 log.Fatalf("Error reading: %v", err)
28 }
29
30 if strings.Contains(string(b), "[anon: Go:") {
31 log.Printf("/proc/self/maps:\n%s", string(b))
32 log.Fatalf("/proc/self/maps contains Go annotation")
33 }
34 }
35
View as plain text