-
Notifications
You must be signed in to change notification settings - Fork 17.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
debug/elf: nil pointer dereference when opening os.Executable() #54227
Comments
Seems relate to https://go-review.googlesource.com/c/go/+/380755 |
CC @golang/compiler. |
The code in the zipexe package assumes that every ELF section is a valid So I think this is a bug in the zipexe package: it is making an assumption that the docs do not guarantee. I don't see any simple way to fix this, so closing. Sorry. |
Quickfix for golang/go#54227 until we migrate to go embed
Ignore sections that are compressed. There may be a more elaborate fix using `Section.Open`, but this should be sufficient. It's likely now with `embed` usage of this package will be going down. Fixes #6. See golang/go#54227 for more context.
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes, only with 1.19
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
Compile a oneliner with the library
github.com/GeertJohan/go.rice
. the binary crashes when starting. Without the import everything is ok. My code works since many years with this library, but with 1.19 every binary crashes immediatlyWhat did you expect to see?
The output
Hello
What did you see instead?
Using go 1.18 works fine. but with 1.19 the program crashes in the
init
function of the library. Perhaps the library is buggy, but there seems to be some incompatiblitiesThe text was updated successfully, but these errors were encountered: