Skip to content

runtime: confusing stack traces for panics in defers triggered by other panics #5832

Closed
@gopherbot

Description

@gopherbot

by leterip:

What steps will reproduce the problem?
If possible, include a link to a program on play.golang.org.
1. In some function, defer a call to some function (Two in the example) which deadlocks
2. In the same function, call some function (One in the example) which panics.
3. Observe the output of the stack trace.

http://play.golang.org/p/jUUC4O2XQu

What is the expected output?
A stack trace that doesn't indicate that One is calling Two.

What do you see instead?
A stack trace that does indicate that One called Two.

Which compiler are you using (5g, 6g, 8g, gccgo)?
6g

Which operating system are you using?
os x/playground

Which version are you using?  (run 'go version')
go1.1.1 or go1.1 (unknown if earlier)

Please provide any additional information below.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions