Skip to content

runtime: CallersFrames showing mangled package path for nonASCII pkg name #27835

@thanm

Description

@thanm

Please answer these questions before submitting your issue. Thanks!

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

go tip:
go version devel +16687a3bbf Fri Sep 14 12:39:54 2018 +0000 linux/amd64

Does this issue reproduce with the latest release?

yes

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

linux/amd64

What did you do?

In your $GOPATH, unpack the attached tar file: tarfile.gz which will create two subdirs ' Äfoo' and 'Äbar. Change directory to the second and do 'go run':

$ tar zxvf - < tarfile.gz
./Äbar/
./Äbar/Äbar.go
./Äfoo/
./Äfoo/Äfoo.go
$ cd Äbar
$ go run .
- more:true | runtime.Callers
- more:true | %c3%84foo.PrintTrace
- more:true | %c3%84foo.Äblix
- more:true | %c3%84foo.Äbar
- more:true | main.main
- more:true | runtime.main
- more:false | runtime.goexit
Äfoo.Äbar(33) returns 134
$ 

Note that in the output from runtime.CallersFrames the functions in package Äbar are shown with packagepath in mangled form (e.g. %c3%84foo.Äblix) instead of regular form (Äbar.Äblix).

What did you expect to see?

Correct package path Äbar.Äblix in callersframe output

What did you see instead?

Mangled package path %c3%84foo

Note: not sure if this is a real bug, pilot error on my part, or if this is WAI. Please close out if appropriate. Also not sure (assuming there is a bug) if this is a compiler issue or a runtime issue (could be that the runtime is simply spitting out whatever the compiler told it. Thanks -NM.

Metadata

Metadata

Assignees

No one assigned

    Labels

    NeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.compiler/runtimeIssues related to the Go compiler and/or runtime.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions