Skip to content
This repository was archived by the owner on Dec 1, 2021. It is now read-only.
This repository was archived by the owner on Dec 1, 2021. It is now read-only.

Stack trace incorrect in go 1.12 #180

@uberbo

Description

@uberbo

Simplest way to reproduce:

package main

import (
	"fmt"
	"github.com/pkg/errors"
)

func main() {
	fmt.Printf("%+v\n", errors.New("fail fast"))
}

Output:

Wrong file name for main.main and includes skipPleaseUseCallersFrames:

fail fast
main.main
	/gocode/src/github.com/pkg/errors/errors.go:104
runtime.skipPleaseUseCallersFrames
	/sdk/go1.12beta1/src/runtime/asm.s:40
runtime.main
	/sdk/go1.12beta1/src/runtime/proc.go:200
runtime.goexit
	/sdk/go1.12beta1/src/runtime/asm_amd64.s:1337

Using

go version go1.12beta1 darwin/amd64

Expected output

fail fast
main.main
	/gocode/src/playground/go12betapkgerrors/main.go:9
runtime.main
	/usr/local/Cellar/go/1.11.4/libexec/src/runtime/proc.go:201
runtime.goexit
	/usr/local/Cellar/go/1.11.4/libexec/src/runtime/asm_amd64.s:1333

Related: golang/go#29526 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions