Skip to content

fix: re-sort collection summaries after inferring usage - #22

Merged
dylandreimerink merged 2 commits into
cilium:mainfrom
immanuwell:fix/sort-inferred-stack-usage
Aug 21, 2026
Merged

fix: re-sort collection summaries after inferring usage#22
dylandreimerink merged 2 commits into
cilium:mainfrom
immanuwell:fix/sort-inferred-stack-usage

Conversation

@immanuwell

@immanuwell immanuwell commented Aug 20, 2026

Copy link
Copy Markdown
Contributor

Collection summaries are sorted before instruction-derived usage is applied. With optimized DWARF that leaves inferred entries in the old order, so the final list can be wrong. Low-key confusing.

The fix runs final values through the existing sorter. A Clang 22 fixture covers it too.

Repro before this fix:

$ go run ./cmd/stackwhere list testdata/noinline.o
  8 bytes - z_known
  8 bytes - entry
  0 bytes - helper

entry should come first by name.

The CI linter is updated to 2.13 for Go 1.27 support.

Tests: go test ./..., go test -race ./..., go vet ./..., golangci-lint run, make -C testdata docker

Signed-off-by: immanuwell <pchpr.00@list.ru>
Signed-off-by: immanuwell <pchpr.00@list.ru>
@dylandreimerink
dylandreimerink merged commit a047322 into cilium:main Aug 21, 2026
3 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.

2 participants