Skip to content

debug/pe: TestInternalLinkerDWARF fail in windows #64200

@qiulaidongfeng

Description

@qiulaidongfeng

What version of Go are you using (go version)?

$ go version
go version devel go1.22-d6ef98b8 Thu Nov 16 05:53:55 2023 +0000 windows/amd64

Does this issue reproduce with the latest release?

yes.

What operating system and processor architecture are you using (go env)?

go env Output
$ go env
set GO111MODULE=auto
set GOARCH=amd64
set GOBIN=
set GOCACHE=D:\tmp\go-build
set GOENV=C:\Users\26454\AppData\Roaming\go\env
set GOEXE=.exe
set GOEXPERIMENT=
set GOFLAGS=
set GOHOSTARCH=amd64
set GOHOSTOS=windows
set GOINSECURE=
set GOMODCACHE=D:\file\gofile\pkg\mod
set GONOPROXY=
set GONOSUMDB=
set GOOS=windows
set GOPATH=D:\file\gofile
set GOPRIVATE=
set GOPROXY=https://goproxy.cn,direct
set GOROOT=C:\Users\26454\.go\current
set GOSUMDB=sum.golang.org
set GOTMPDIR=
set GOTOOLCHAIN=local
set GOTOOLDIR=C:\Users\26454\.go\current\pkg\tool\windows_amd64
set GOVCS=
set GOVERSION=devel go1.22-d6ef98b8 Thu Nov 16 05:53:55 2023 +0000
set GCCGO=gccgo
set GOAMD64=v3
set AR=ar
set CC=gcc
set CXX=g++
set CGO_ENABLED=1
set GOMOD=
set GOWORK=
set CGO_CFLAGS=-O2 -g
set CGO_CPPFLAGS=
set CGO_CXXFLAGS=-O2 -g
set CGO_FFLAGS=-O2 -g
set CGO_LDFLAGS=-O2 -g
set PKG_CONFIG=pkg-config
set GOGCCFLAGS=-m64 -mthreads -Wl,--no-gc-sections -fmessage-length=0 -ffile-prefix-map=C:\Users\26454\AppData\Local\Temp\go-build186784699=/tmp/go-build -gno-record-gcc-switches

What did you do?

go test debug/pe

What did you expect to see?

test pass.

What did you see instead?

--- FAIL: TestInternalLinkerDWARF (0.99s)
    file_test.go:389: building test executable for linktype 2 failed: exit status 1 # command-line-arguments
        panic: runtime error: index out of range [10] with length 10

        goroutine 1 [running]:
        cmd/link/internal/loader.(*Relocs).At(...)
                C:/Users/26454/.go/current/src/cmd/link/internal/loader/loader.go:1885
        cmd/link/internal/loadpe.findHandlerInXDataAMD64(0xc00009a000, 0x1812c, 0x44)
                C:/Users/26454/.go/current/src/cmd/link/internal/loadpe/seh.go:108 +0x2b2
        cmd/link/internal/loadpe.processSEHAMD64(0xc00009a000, 0x1812d)
                C:/Users/26454/.go/current/src/cmd/link/internal/loadpe/seh.go:54 +0x1a5
        cmd/link/internal/loadpe.processSEH(0xc00009a000?, 0xc000018144?, 0x29a2e40?, 0xc0?)
                C:/Users/26454/.go/current/src/cmd/link/internal/loadpe/seh.go:33 +0x79
        cmd/link/internal/loadpe.Load(0xc00009a000, 0x77ed20, 0x71, 0xc0023eae50, {0x581b85, 0x4}, 0x5fe8d0?, {0xc0023eeaf0, 0x64})
                C:/Users/26454/.go/current/src/cmd/link/internal/loadpe/ldpe.go:605 +0x18cd
        cmd/link/internal/ld.ldobj.func3(0xc00014e000, 0xc0023eae50?, {0x581b85?, 0x0?}, 0xc0023eeaf0?, {0xc0023eeaf0?, 0xc0023eeaf0?})
                C:/Users/26454/.go/current/src/cmd/link/internal/ld/lib.go:2223 +0x6b
        cmd/link/internal/ld.hostObject(0xc00014e000, {0x581b85, 0x4}, {0xc0023eeaf0, 0x64})
                C:/Users/26454/.go/current/src/cmd/link/internal/ld/lib.go:2397 +0x378
        cmd/link/internal/ld.loadWindowsHostArchives(0xc00014e000)
                C:/Users/26454/.go/current/src/cmd/link/internal/ld/lib.go:695 +0x10d
        cmd/link/internal/ld.(*Link).loadlib(0xc00014e000)
                C:/Users/26454/.go/current/src/cmd/link/internal/ld/lib.go:641 +0x7c5
        cmd/link/internal/ld.Main(_, {0x20, 0x20, 0x1, 0x7, 0x10, 0x0, {0xc0000086b9, 0x1, 0x1}, ...})
                C:/Users/26454/.go/current/src/cmd/link/internal/ld/main.go:347 +0x122b
        main.main()
                C:/Users/26454/.go/current/src/cmd/link/main.go:72 +0xdfb
FAIL
FAIL    debug/pe        9.143s
FAIL

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions