Skip to content

fix(lang-v2): preserve qself in InitSpace type paths - #4901

Open
0x4ka5h wants to merge 4 commits into
otter-sec:anchor-nextfrom
akash-osec:fix/v2-init-space-qself
Open

fix(lang-v2): preserve qself in InitSpace type paths#4901
0x4ka5h wants to merge 4 commits into
otter-sec:anchor-nextfrom
akash-osec:fix/v2-init-space-qself

Conversation

@0x4ka5h

@0x4ka5h 0x4ka5h commented Aug 11, 2026

Copy link
Copy Markdown
Collaborator

Findings (AI # 69 & # 68):

InitSpace mishandles type paths: it drops qself on qualified associated types, and matches built-in sizes by final segment only, so custom::Address gets 32 bytes .

Fix:

Quote the full TypePath in the fallback, and apply built-in shortcuts only to unqualified single-segment paths so qualified types use <Type as Space>::INIT_SPACE.

@hacktron-app

hacktron-app Bot commented Aug 11, 2026

Copy link
Copy Markdown

Hacktron Security Check - Skipped

Reason: OSS PR review limit reached for this approved repository and developer. New OSS PRs for this repository will resume at the start of the next cycle.

Wait for the next cycle. OSS quota is limited to the approved OSS repository and cannot be used on paid repositories.

@vercel

vercel Bot commented Aug 11, 2026

Copy link
Copy Markdown

@akash-osec is attempting to deploy a commit to the OtterSec Team on Vercel.

A member of the Team first needs to authorize it.

@akash-osec
akash-osec force-pushed the fix/v2-init-space-qself branch from ec0f5fe to e36e20d Compare August 11, 2026 08:18
@codecov-commenter

codecov-commenter commented Aug 11, 2026

Copy link
Copy Markdown

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

❌ Patch coverage is 93.47826% with 3 lines in your changes missing coverage. Please review.
⚠️ Please upload report for BASE (anchor-next@e4878b6). Learn more about missing BASE report.

Files with missing lines Patch % Lines
lang-v2/derive/src/init_space.rs 93.47% 3 Missing ⚠️
❗ Your organization needs to install the Codecov GitHub app to enable full functionality.
Additional details and impacted files
@@              Coverage Diff               @@
##             anchor-next    #4901   +/-   ##
==============================================
  Coverage               ?   64.65%           
==============================================
  Files                  ?      127           
  Lines                  ?    16621           
  Branches               ?        0           
==============================================
  Hits                   ?    10746           
  Misses                 ?     5875           
  Partials               ?        0           
Flag Coverage Δ
v2 64.65% <93.47%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@akash-osec
akash-osec force-pushed the fix/v2-init-space-qself branch from e36e20d to 747480a Compare August 11, 2026 11:07
@akash-osec
akash-osec force-pushed the fix/v2-init-space-qself branch from 747480a to 05a30a3 Compare August 13, 2026 12:32
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.

4 participants