Skip to content

Fix confused declarations in non-unity build - #1969

Open
nbeck-SMT wants to merge 1 commit into
mono:mainfrom
nbeck-SMT:fix/decl-cache-native-identity
Open

nbeck-SMT wants to merge 1 commit into
mono:mainfrom
nbeck-SMT:fix/decl-cache-native-identity

Conversation

@nbeck-SMT

Copy link
Copy Markdown
Contributor

This PR fixes the problem with non-unity generators described in #1965.

The root cause is that CppSharp uses clang’s memory addresses to identify declarations even after clang has freed that memory. Commit e464da4 already mentions “duplicated original pointers” and added Kind to the key. That makes collisions less likely but doesn’t prevent them.

I don't understand enough about the whole project to know if this renders the whole dictionary useless.

@nbeck-SMT
nbeck-SMT marked this pull request as ready for review November 12, 2026 13:54

This branch has not been deployed

No deployments
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.

1 participant