Skip to content
This repository has been archived by the owner on Dec 14, 2023. It is now read-only.

panic on import #226

Open
rogpeppe opened this issue Aug 25, 2016 · 1 comment
Open

panic on import #226

rogpeppe opened this issue Aug 25, 2016 · 1 comment

Comments

@rogpeppe
Copy link

I knew this was a ridiculous thing to try, but I tried it anyway...

% llgo.llgoi
(llgo) import "github.com/juju/juju/api"
panic: runtime error: string index out of bounds
:0 (0x7e2efc)
    ???: ???
/tmp/gopath683283970/src/llvm.org/llgo/cmd/llgoi/llgoi.go:174 (0x7e2e19)
:0 (0x7e2e72)
    ???: ???
:0 (0x7f947243b66d)
    ???: ???
:0 (0x7f947244f926)
    ???: ???
:0 (0x7f947243df52)
    ???: ???
:0 (0x7f946c86d8ca)
    ???: ???
:0 (0x7f946c86d7b4)
    ???: ???
/tmp/gopath683283970/src/llvm.org/llgo/cmd/llgoi/llgoi.go:180 (0x7e29a0)
/tmp/gopath683283970/src/llvm.org/llgo/cmd/llgoi/llgoi.go:458 (0x7e1cb0)
/tmp/gopath683283970/src/llvm.org/llgo/cmd/llgoi/llgoi.go:441 (0x7e1737)
/tmp/gopath683283970/src/llvm.org/llgo/cmd/llgoi/llgoi.go:487 (0x7e5230)
/tmp/gopath683283970/src/llvm.org/llgo/cmd/llgoi/llgoi.go:584 (0x7e68cc)
:0 (0x7f947245277d)
    ???: ???
:0 (0x7f9472455408)
    ???: ???
:0 (0x7f9471488590)
    ???: ???
@axw
Copy link
Member

axw commented Aug 25, 2016

Heh, been there :)

The panic is due to some code in the juju/errors package, where we call runtime.Caller. The result is invalid (no path is returned), but no error is returned either. I believe the issue is to do with back tracing in the gofrontend runtime, which assumes that all code lives in the main executable. It would need to be updated to search dynamic libraries also.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants