env GO111MODULE=on

# Go 1.24 module should disable decoratemappings.
go list -f '{{.Module.GoVersion}} {{.DefaultGODEBUG}}'
stdout decoratemappings=0

[!GOOS:linux] skip
[short] skip

# Programs in Go 1.24 module should never see annotations. This ensures that
# the runtime has not overridden the default.
go run .

-- go.mod --
go 1.24
module m

-- main.go --
package main

import (
	"log"
	"os"
	"strings"
)

func main() {
	b, err := os.ReadFile("/proc/self/maps")
	if err != nil {
		log.Fatalf("Error reading: %v", err)
	}

	if strings.Contains(string(b), "[anon: Go:") {
		log.Printf("/proc/self/maps:\n%s", string(b))
		log.Fatalf("/proc/self/maps contains Go annotation")
	}
}
