Skip to content

ref(symcache): Add Type::UNKNOWN sentinel constant - #1107

Merged
szokeasaurusrex merged 1 commit into
szokeasaurusrex/void-pointers-symcachefrom
szokeasaurusrex/constant-for-unknown-type
Oct 28, 2026
Merged

szokeasaurusrex merged 1 commit into
szokeasaurusrex/void-pointers-symcachefrom
szokeasaurusrex/constant-for-unknown-type

Conversation

@szokeasaurusrex

Copy link
Copy Markdown
Member

Define v9::raw::Type::UNKNOWN (u32::MAX) alongside Type::VOID (u32::MAX - 1) and use Type::UNKNOWN in SymCacheConverter when a variable or referenced type cannot be resolved.


Stack created with GitHub Stacks CLI • Give Feedback 💬

@szokeasaurusrex
szokeasaurusrex requested a review from a team as a code owner October 23, 2026 09:03
@vjeranc

vjeranc commented Oct 23, 2026 •

Copy link
Copy Markdown
Member

Late to the party, but the void/unknown split requires checking every path that previously conflated the two. Reading this now, to_type_ref() returns None for unsupported references too, which now gets interpreted as void*. We should distinguish an absent DW_AT_type from a present reference we can’t resolve.

It looks like the original Void enum implementation in #1100 avoided this bug: an absent attribute kept the explicit void reference, while an unsupported reference became None and returned unknown. The distinction appears to have been lost in the rewrite to Option<TypeRef>.

@szokeasaurusrex
szokeasaurusrex force-pushed the szokeasaurusrex/constant-for-unknown-type branch from 701e51d to 063952e Compare October 23, 2026 12:39
@szokeasaurusrex
szokeasaurusrex force-pushed the szokeasaurusrex/constant-for-unknown-type branch from 063952e to 3896943 Compare October 23, 2026 15:16
@szokeasaurusrex

Copy link
Copy Markdown
Member Author

@vjeranc I believe your concern should be addressed by 3b8f1a6 on #1100

Define `v9::raw::Type::UNKNOWN` (`u32::MAX`) alongside `Type::VOID` (`u32::MAX - 1`) and use `Type::UNKNOWN` in `SymCacheConverter` when a variable or referenced type cannot be resolved.
@szokeasaurusrex
szokeasaurusrex force-pushed the szokeasaurusrex/constant-for-unknown-type branch from 3896943 to de6af2e Compare October 27, 2026 11:53
@szokeasaurusrex
szokeasaurusrex merged commit ac235c1 into master Oct 28, 2026
39 of 40 checks passed
@szokeasaurusrex
szokeasaurusrex deleted the szokeasaurusrex/constant-for-unknown-type branch October 28, 2026 08:03
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