Enable inline-frame symbolication; fix Windows return-address off-by-one#23
Merged
dylan-conway merged 1 commit intomainfrom Apr 11, 2026
Merged
Enable inline-frame symbolication; fix Windows return-address off-by-one#23dylan-conway merged 1 commit intomainfrom
dylan-conway merged 1 commit intomainfrom
Conversation
…by-one - llvm-symbolizer/pdb-addr2line now run with --inlines/-i; processSymbolizerOutput parses blank-line-separated blocks so one input address can yield N frames. Previously --no-inlines collapsed the inline chain and attributed the inlining-site file:line to the outermost function. - cleanFunctionName: preserve `.method` suffix after a Zig generic `Type(params)` group instead of truncating at `(` (was turning `Queue(T).push` into `Queue`). - adjustBunAddresses: decrement non-first bun addresses by 1 on Windows only. crash_handler.zig already encodes addr-1 on macOS/Linux but emits raw return addresses on Windows; without the decrement the symbolizer lands on the *next* inlined region (e.g. the following defer), producing phantom frames. - Break git.ts <-> debug-store.ts circular import (TDZ on cache_root when imported via capture-fixture.ts). - Hand-crafted symbolize fixtures: add blank-line separators between addresses to match real symbolizer output. Add 4 real captured fixtures (linux/macos/ macos/windows) covering the above.
|
Caution Review failedPull request was closed or merged during review WalkthroughThis change updates symbolization command arguments to enable inline information, refactors address adjustment and output parsing logic in the symbolizer, modifies cache directory resolution, and introduces regression test fixtures for Linux, macOS, and Windows crash scenarios. Changes
🚥 Pre-merge checks | ✅ 2✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Comment |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
--inlines/-iforllvm-symbolizer(Linux/macOS) andpdb-addr2line(Windows).processSymbolizerOutputnow parses blank-line-separated blocks so one input address can expand to N inline frames.cleanFunctionName: keep the.methodsuffix after a Zig genericType(params)group. Was turningUnboundedQueue(Job,.next).pushinto justUnboundedQueue.adjustBunAddresses: decrement non-first bun addresses by 1 on Windows only.crash_handler.zigalready encodesaddr - 1on macOS/Linux but emits raw return addresses on Windows; without the decrement the symbolizer lands on the next inlined region (e.g. the followingdefer), producing phantom frames likearena.deinit/fetchSubthat aren't on the call path.git.ts↔debug-store.tscircular import (TDZ oncache_rootwhen imported viacapture-fixture.ts).Why
--no-inlineswas passed only because the original parser consumed exactly two lines per address. With it, the symbolizer collapses the inline chain and glues the inlining-site file:line onto the outermost function name — both lossy and misleading.Before / after (real traces, see new fixtures)
HTTPThreadsegfaultprocessEvents @ HTTPThread.zig:376(wrong fn)drainQueuedShutdowns @ :376(actual crash site)RuntimeTranspilerStoreUnboundedQueue(method name lost)UnboundedQueue(...).pushBatchRuntimeTranspilerStoreeventLoop/deinit/fetchSub(phantom frames from off-by-one)eventLoop→dispatchToMainThread:241→run:294→runFromWorkerThread:286→ThreadPool.run:581→entryFn149 tests pass.