You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@beam.apache.org by lo...@apache.org on 2019/11/27 22:05:38 UTC

[beam] branch lostluck-symtab-panic created (now 57c6ef6)

This is an automated email from the ASF dual-hosted git repository.

lostluck pushed a change to branch lostluck-symtab-panic
in repository https://gitbox.apache.org/repos/asf/beam.git.


      at 57c6ef6  [GoSDK] Don't panic if debug symbols are striped

This branch includes the following new commits:

     new 57c6ef6  [GoSDK] Don't panic if debug symbols are striped

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



[beam] 01/01: [GoSDK] Don't panic if debug symbols are striped

Posted by lo...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

lostluck pushed a commit to branch lostluck-symtab-panic
in repository https://gitbox.apache.org/repos/asf/beam.git

commit 57c6ef65a63aaa4a79520a36b1de521793e33d19
Author: Robert Burke <lo...@users.noreply.github.com>
AuthorDate: Wed Nov 27 14:05:25 2019 -0800

    [GoSDK] Don't panic if debug symbols are striped
    
    When debug symbols are stripped, the fields listing may be empty, which causes the next line to panic. Check the length so we can fail gracefully and more clearly in this case.
---
 sdks/go/pkg/beam/core/util/symtab/symtab.go | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sdks/go/pkg/beam/core/util/symtab/symtab.go b/sdks/go/pkg/beam/core/util/symtab/symtab.go
index 68abfd8..cbd539d 100644
--- a/sdks/go/pkg/beam/core/util/symtab/symtab.go
+++ b/sdks/go/pkg/beam/core/util/symtab/symtab.go
@@ -154,7 +154,7 @@ func (s *SymbolTable) Sym2Addr(symbol string) (uintptr, error) {
 			break
 		}
 
-		if e.Tag == dwarf.TagSubprogram {
+		if e.Tag == dwarf.TagSubprogram && len(e.Field) >= 2 {
 			nf := e.Field[0]
 			if nf.Attr.String() == "Name" && nf.Val.(string) == symbol {
 				addr := e.Field[1].Val.(uint64)