]> Cypherpunks repositories - gostls13.git/commit
debug/dwarf: better error handling in SeekPC
authorThan McIntosh <thanm@google.com>
Thu, 31 Mar 2022 11:47:19 +0000 (07:47 -0400)
committerThan McIntosh <thanm@google.com>
Fri, 1 Apr 2022 14:08:14 +0000 (14:08 +0000)
commit1fc3346275d0457cfc154b1001b25bd0cb0c1751
tree1d642c639508681710cddb3e9fb7b0b0c60e4b86
parent2e8dc8f4725c84d352b718620628a4fb0f86e748
debug/dwarf: better error handling in SeekPC

The dwarf.Reader "SeekPC" method was not properly handling the case
of a truncated/empty unit (something that has header information
but an empty abbrev table and no DIEs). Add some guards to handle
this case.

Fixes #52045.

Change-Id: I978163eca3b610f7528058693b840931e90d3f63
Reviewed-on: https://go-review.googlesource.com/c/go/+/397054
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Trust: Than McIntosh <thanm@google.com>
Run-TryBot: Than McIntosh <thanm@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
src/debug/dwarf/entry.go
src/debug/dwarf/entry_test.go