Repository navigation
Conversation
|
This PR is set for a Plus review. TREX isn't supported with Plus or Apex reviews yet, so Greptile reviews this PR at Base while TREX is on. |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 1737f6dc44
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
|
|
@greptileai review |
f68caf5 to
e93f81f
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e93f81f0aa
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 60c53c8b85
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
|
Quick note on the red CI for this head: the failing checks are all in tests unrelated to this diff — |
|
Want your agent to iterate on Greptile's feedback? Try greploops. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 8d03a3f9a5
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 8f674a9cd4
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
Review findings addressed at their producing boundaries and consumers. Latest changes were reviewed from source; tests and provider runs were skipped at the maintainer's request. Findings requiring separate decisions or verification remain open. Protocol and class list scans now share the same readListSlot failure/budget owner. The class-list scanner no longer has an independent unbounded catch path; the existing large class-section regression remains in the branch. Current source: 8f674a9. Validation: source inspection only; tests and checks were skipped at the user's explicit request. Slot-pointer failures are accounted for before record decoding. Once a mapped pointer reaches readClass, that decoder owns its admission; the class error catch only preserves the decoding failure and never charges the same class again. Current source: 8f674a9. Validation: source inspection only; tests and checks were skipped at the user's explicit request. The failed-pointer slot is now charged once by a shared readListSlot owner used by both protocol and class lists. Failed slots consume max_records, preserve their actual read failure, and cannot drive work based only on an enormous declared section size. Current source: 8f674a9. Validation: source inspection only; tests and checks were skipped at the user's explicit request. Zero and duplicate mapped pointers bypass record admission, so a record-only bound did not bound list scanning. The shared slot reader now charges every protocol/class list attempt against one scan limit derived from the caller-selected max_records, separately from record admission. Existing record decoders still charge each actual record once. Class coverage counts only attempted reads; nested protocol and category scanners were inspected and already admit before each slot. Current source: 8f674a9. Validation: source inspection only; tests and checks were skipped at the user's explicit request. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c9b7b7e8f7
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
Review findings addressed at their producing boundaries and consumers. Latest changes were reviewed from source; tests and provider runs were skipped at the maintainer's request. Findings requiring separate decisions or verification remain open. List-scan exhaustion was being written into the global record-admission budget even when no record was consumed. The Objective-C list producer now returns its own scan-truncation fact, and coverage applies it only to objc_class_method_ivar_metadata. Category, relative-pointer and Swift coverage still use their own decode facts and actual global record exhaustion. Updated the coverage consumers and fixtures, and added the two-zero-protocol-slot regression with max_records=1 asserting independent facets remain complete. Failed-slot record accounting and bounded scanning remain intact. Current source: c9b7b7e. Validation: source inspection only; authored regressions were not executed. Tests, checks, builds and provider execution were skipped at the user's explicit request. No passing runtime or real-provider result is claimed. Directly related representation and consumer cleanup is included. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a81b75c801
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
|
Source fixes and publication evidence for the review findings below. Tests and executable checks were skipped at the maintainer's request. Findings that still require a decision or execution evidence remain open. A class-list slot can be skipped when the scan limit is consumed by zero, duplicate, or unmapped slots before a later class. The decoder now tracks class-list truncation separately and marks the class-dependent Objective-C property and relative-pointer facets partial with the resource-limit reason, while leaving facets read independently unaffected. The fix is public in |
|
Source fixes and publication evidence for the review findings below. Tests and executable checks were skipped at the maintainer's request. Findings that still require a decision or execution evidence remain open. The producer replaced an unresolved relative-pointer reason when the record cap was reached, losing one independent coverage gap. Coverage now composes both |
fef9bb7 to
070f538
Compare
…apped A Mach-O image with valid ObjC class metadata plus one unmapped __objc_protolist slot failed its ENTIRE dispatch-metadata inspection. The class-list loop already produced partial coverage on bad slots; the protocol-list guard now mirrors it. Failed protocol slots now also spend one read-budget unit each (previously they bypassed the budget, so a crafted image declaring a huge unmapped section could hang/OOM inspection); crafted sections truncate at maxRecords. Rebased onto morluto/rea e05d339 to pick up the upstream FAT-fixture CI fix.
Same budget-bypass flaw the protocol-list guard fixed: read.pointer(field) throws before readClass can run, so failed class-list slots never spent the record budget and a crafted tiny Mach-O declaring a huge unmapped __objc_classlist section drove unbounded CPU and unbounded failure strings. The class-list catch now mirrors the protocol-list one: each failed slot admits once to the budget, truncating at maxRecords with max_records_reached; successful slots keep spending exactly one unit via readClass's internal admit. Regression test: "bounds failed class-list slots by the record budget" (10,000 declared unmapped slots -> failures <= 100, reason contains max_records_reached); red before, green after.
readClass and protocolReader.record admit the record budget themselves before anything in them can throw, so the loop catch admitting again counted one mapped-but-malformed class/protocol twice: at the budget boundary it broke before appending the failure reason (reporting only max_records_reached), and with larger limits malformed entries starved valid ones behind them. Split each loop's single try/catch into two stages: the slot-pointer read keeps the admit-on-failure guard (unmapped slots must still spend budget, bounding crafted file-declared section sizes); the readClass/record stage only records the failure, since its slot was already admitted inside the callee.
070f538 to
98f985b
Compare
Preserve XML and Interface Builder identity at their parsing boundary, retain usable Objective-C slots with precise coverage, and keep native trace failures distinct from absence. Add caller-selected Interface Builder summaries backed by complete retained Evidence, and preserve comparison limitations. Reviewed fixes: #1969, #2088, #2108, #2513, #2639, #2684, #2731, #2759, #2875, #2888, #2889, #2970, #2971, #3002. Validation: relevant native/domain focused lane passed 142 tests; earlier Interface Builder/MCP checks passed 24 tests. Real native UI and Ghidra producer coverage was not repeated.
|
Closing as superseded — 55dd21a carries the same fix on main (verified the file matches) with additional coverage. Thanks for taking it the rest of the way. |
Summary
Fixes #2610.
A Mach-O image with valid Objective-C class metadata and an unmapped
__objc_protolistslot failed its entire static dispatch-metadata decode. The class-list loop already records per-slot mapping failures into partial coverage, but the protocol-list loop read its slot pointer unguarded, so the same unmapped pointer aborted the whole decode beforeprotocolReader.recordcould handle the record. Now the protocol-list slot uses the same guard as the class-list slot: the failure is recorded, theobjc_class_method_ivar_metadatafacet coverage becomes partial with a reason naming the mapping failure, and the independently decodable class is retained.Problem and expected behavior
Smallest trigger: build the 4096-byte fixture from the issue with the protocol-list section address pointing at an unmapped page (
base + 0x9000). The decode throwsRangeError: Unmapped or ambiguous metadata pointer 0x100009000out ofdecodeObjcDispatchFacetsat the protolist loop (AppleObjcDispatchFacets.ts:203). Expected: partial coverage with a reason identifying the mapping failure whileRetainedClassand its coverage records still reach the caller, matching the existing behavior for an unmapped class-list slot.Change and scope
Wrapped the per-slot pointer read in the
__objc_protolistloop in the same try/catch shape the__objc_classlistloop already uses in the same function: the field address is hoisted, the failure is pushed tofailuresas<field>: <message>, and the loop continues.pushDispatchCoveragealready turns those failure strings into partial facet coverage with a reason, so no other code changes were needed. Added three regression tests insrc/native/AppleDispatchMetadata.test.tsusing the fixture from the issue verbatim (controlsneither,class,protocol).Scope decision: not applicable. This is a routine fix inside the existing decode boundary; no new providers, no target execution, no new scope.
Contract and boundary impact
decodeObjcDispatchFacets,src/native/AppleObjcDispatchFacets.ts).Expected effects:
Evidence and regression coverage
src/native/AppleDispatchMetadata.test.ts("Apple dispatch unmapped protocol-list slot"), fixture builder taken verbatim from the issue.RangeError: Unmapped or ambiguous metadata pointer 0x100009000(new test failed red); after the fix the same control returnsRetainedClasswith the facet coveragepartialand the reason containing0x100009000. Theneithercontrol still returns the class with complete coverage, and theclasscontrol still yields partial coverage as before.NativeMacOSProviderprovider-level repro was not exercised; the decoder test covers the root cause directly and the provider path only wraps this decoder.For evidence-bearing changes:
Validation performed
npm run test:local -- src/native/AppleDispatchMetadata.test.ts- 25/25 passed (22 existing + 3 new; the protocol control failed before the fix, passed after)npm run test:local -- src/native/AppleSwiftVtables.test.ts- 3/3 passed (only other test file importing this code path)npm run check:fast- typecheck + lint greennpm run verify:test-discovery- all 1024 test files discovered exactly onceCompatibility, safety, and release
Before merge
type(scope): outcome.