Skip to content

nativeunwind: fix Go 1.26#1083

Merged
christos68k merged 1 commit into
open-telemetry:mainfrom
florianl:fix-go-1-26
Jan 20, 2026
Merged

nativeunwind: fix Go 1.26#1083
christos68k merged 1 commit into
open-telemetry:mainfrom
florianl:fix-go-1-26

Conversation

@florianl
Copy link
Copy Markdown
Member

As mentioned by @bobrik in #1032 (comment) I introduced a bug when handling Go 1.26 with #1032.

Due to the incorrect break statement, g.funcMapSize and g.funSize are not set correctly and therefore break stack unwinding.

How to test this change:

--- a/Makefile
+++ b/Makefile
@@ -72,7 +72,7 @@ ebpf: generate
        $(MAKE) $(EBPF_FLAGS) -C support/ebpf
 
 ebpf-profiler: generate ebpf
-       go build $(GO_FLAGS) -tags $(GO_TAGS)
+       GOTOOLCHAIN=go1.26rc2 go build $(GO_FLAGS) -tags $(GO_TAGS)
 

When handling Go 1.26 binaries, there is still a log entry, like level=ERROR msg="Failed to load /path/to/my/go/1.26/binary: unsupported Go version go1.26rc2 (need >= 1.13 and <= 1.25)". This log entry originates from the Go labels handling - which I didn't look into yet. My priority is/was being able to handle stack unwinding.

Signed-off-by: Florian Lehner <florian.lehner@elastic.co>
@florianl florianl requested review from a team as code owners January 17, 2026 10:58
@fabled
Copy link
Copy Markdown
Contributor

fabled commented Jan 17, 2026

coredump test case would be nice

@christos68k christos68k merged commit a9d2c32 into open-telemetry:main Jan 20, 2026
28 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants