Skip to content
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: handle missing shstrndx #4481

Closed
gopherbot opened this issue Dec 3, 2012 · 5 comments
Closed

debug/elf: handle missing shstrndx #4481

gopherbot opened this issue Dec 3, 2012 · 5 comments
Labels
FrozenDueToAge Suggested Issues that may be good for new contributors looking for work to do.
Milestone

Comments

@gopherbot
Copy link

by grantcmurphy:

Before filing a bug, please check whether it has been fixed since the
latest release. Search the issue tracker and check that you're running the
latest version of Go:

Run "go version" and compare against
http://golang.org/doc/devel/release.html  If a newer version of Go exists,
install it and retry what you did to reproduce the problem.

Thanks.

What steps will reproduce the problem?
If possible, include a link to a program on play.golang.org.

Reproducer available here: http://play.golang.org/p/USKxn3CiS4

1. Create a core file. E.g. $ulimit -c unlimited; sleep 123; Ctrl+\
2. Attempt to read core file using debug/elf
3. Error: invalid ELF shstrndx '0' in record at byte 0x0 

(As a core dump doesn't have the section headers)

What is the expected output?

A *elf.File with an empty []*Section element.

What do you see instead?

Error: invalid ELF shstrndx '0' in record at byte 0x0 

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

6g

Which operating system are you using?

Fedora 17 x86_64. 
Which version are you using?  (run 'go version')


Please provide any additional information below.
@rsc
Copy link
Contributor

rsc commented Dec 9, 2012

Comment 2:

Reading core dumps is a fair amount of work, and debug/elf does not attempt it yet. 
However, we should at least handle shstrndx == 0 when reading the file.

Labels changed: added priority-later, removed priority-triage.

Status changed to Accepted.

@rsc
Copy link
Contributor

rsc commented Dec 10, 2012

Comment 3:

Labels changed: added size-m.

@rsc
Copy link
Contributor

rsc commented Dec 10, 2012

Comment 4:

Labels changed: added suggested.

@davecheney
Copy link
Contributor

Comment 5:

https://golang.org/cl/6936058/
Grant, could you please try this CL and see if it works for you. TBH, i'm not
experienced with the elf format, but this CL passes the test case you supplied.

Owner changed to @davecheney.

Status changed to Started.

@davecheney
Copy link
Contributor

Comment 6:

This issue was closed by revision 7e9d9eb.

Status changed to Fixed.

@gopherbot gopherbot added fixed Suggested Issues that may be good for new contributors looking for work to do. labels Dec 17, 2012
@rsc rsc added this to the Go1.1 milestone Apr 14, 2015
@rsc rsc removed the go1.1 label Apr 14, 2015
@golang golang locked and limited conversation to collaborators Jun 24, 2016
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge Suggested Issues that may be good for new contributors looking for work to do.
Projects
None yet
Development

No branches or pull requests

3 participants