cmd/internal/objfile: Panic with legacy go 1.2 binary #47981
Labels
compiler/runtime
Issues related to the Go compiler and/or runtime.
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone
The objfile command internally contains a branch for legacy go binaries. See:
go/src/cmd/internal/objfile/pe.go
Line 115 in 770df2e
go/src/cmd/internal/objfile/pe.go
Lines 177 to 181 in 770df2e
The epclntab symbol can in some instances point just beyond the .data section. I'm inclined to think this may be an old bug because subtracting the start address of the .data starting virtual address (4096 in this case) brings the value in range of the end of the data section. The binary I am dealing with is go 1.2
Either way, there is zero verification of the symbol values before indexing into the data array, this should be fixed so that a nice error can be ommited rather than panicking unexpectedly. This also involves my old ticket as well: #42954. For binaries such as this one with invalid symbols the tab can be trivially found with a signature scan. This would be an even better fallback behavior than printing an 'error malformed pclntab symbols'.
The text was updated successfully, but these errors were encountered: