Skip to content

fix: replace fragile hardcoded stack-frame depth in MBGlobalPackages#35

Merged
alubbock merged 1 commit intomainfrom
fix/stack-frame-comment
Mar 12, 2026
Merged

fix: replace fragile hardcoded stack-frame depth in MBGlobalPackages#35
alubbock merged 1 commit intomainfrom
fix/stack-frame-comment

Conversation

@alubbock
Copy link
Copy Markdown
Owner

Summary

  • capture_functions previously walked exactly 3 frames up the call stack to find the caller's globals. This would silently capture the wrong scope if any internal call chain changed.
  • Replaced with a path-based search that walks up until the first frame whose source file is outside the microbench package directory (excluding tests/ so existing tests still work)
  • The existing test_capture_global_packages test covers this

@alubbock alubbock force-pushed the fix/stack-frame-comment branch from 0513c15 to 48507b3 Compare March 12, 2026 23:51
@alubbock alubbock merged commit 1f890d8 into main Mar 12, 2026
20 checks passed
@alubbock alubbock deleted the fix/stack-frame-comment branch March 12, 2026 23:55
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.

1 participant