[port #1065] strip tiny source position tables at link time (design caveat) - #10
Draft
luantak wants to merge 2 commits into
Draft
[port #1065] strip tiny source position tables at link time (design caveat)#10luantak wants to merge 2 commits into
luantak wants to merge 2 commits into
Conversation
Copilot High: ^uint32(0) in runtime.cutab can OOB into filetab. Write 0
so accidental lookups resolve to filetab[0] ("?"). NOTE: mvdan design
buy-in still needed before upstream merge.
Co-authored-by: Paul <luantak@pm.me>
cursor
Bot
force-pushed
the
cursor/maremagnum-pr-1065-tiny-source-positions-2676
branch
from
August 11, 2026 21:05
9075344 to
de0ff04
Compare
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.
Validity: questionable — design buy-in from mvdan still needed
mvdan is skeptical: further linker patches increase per-Go-release maintenance cost, and asked why short
-tinypositions are a problem. Copilot High flagged an OOB concern with^uint32(0)incutab.Do not present this as ready to merge upstream blindly.
Upstream
burrowers#1065
Commit layout
Commit 1 is Maremagnum's from burrowers#1065 (author preserved as on the upstream commit:
autoprofiler <autoprofiler@local.invalid>); following commit(s) address luantak/mvdan review feedback and are authored by the Cursor/luantak port side.16c6b01 autoprofiler | strip tiny source position tables at link timede0ff04 Cursor Agent | Address review feedback: write 0 into cutab placeholderWhat this ports
0005-strip-tiny-source-positions-safely.patchremoving filename/line mappings while retaining stack maps / pcsp / pcinline / unwind datatiny.txtarexpectations (caller: ? 0, etc.)Feedback applied
0into theruntime.cutabplaceholder instead of^uint32(0), so accidental lookups resolve tofiletab[0]("?") rather than an out-of-bounds index (per Copilot)Testing
go test -run 'TestScript/tiny$' .✅ (exercises patched linker)Remaining risks
Notes for Paul
Optional / last priority. Useful if you want the more aggressive tiny position stripping and are willing to own the linker-patch cost; otherwise skip or discuss with mvdan first.