Skip to content

Recover inlined function for issue #53#96

Open
kami922 wants to merge 4 commits into
mandiant:masterfrom
kami922:issue-53-inlined-functions
Open

Recover inlined function for issue #53#96
kami922 wants to merge 4 commits into
mandiant:masterfrom
kami922:issue-53-inlined-functions

Conversation

@kami922

@kami922 kami922 commented Jun 4, 2026

Copy link
Copy Markdown
Contributor

closes #53
PR attempts implementation to recover inline functions
reference PR #59

kami922 added 4 commits June 5, 2026 03:55
- Add InlinedCall struct and InlinedList field to FuncMetadata
- Add add(), multiply(), neverInlined() to testproject
- Add comprehensive inline test suite (positive + negative cases)
- Positive tests intentionally fail — implementation not yet written
Constant arguments let the compiler fold add(1,2)/multiply(3,4) into
literals at compile time, leaving no inline-tree evidence to recover
regardless of extraction-code correctness. Deriving from len(os.Args)
forces the compiler to keep real, recoverable inlined instructions.

Also strengthen main_test.go to check for main.multiply by name, not
just main.add, now that both are genuinely recoverable.
…functions

# Conflicts:
#	testproject/main.go
Reads moduledata.gofunc (go:func.* base) via the existing per-version
layout tables, needed for FUNCDATA_InlTree offsets (issue mandiant#53).
Offset 320/64-bit, 160/32-bit verified against runtime source and a
real test binary; the Go 1.26-only layout bucket is left unset rather
than guessed.
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.

Research Inlined Instance data

1 participant