Repository navigation
fix Diffable C# export crash on PrivateScope fields - #630
Merged
SamboyCoding merged 1 commit intoNov 28, 2026
Merged
Conversation
Coverage Report for CI Build 46156130757Warning Build has drifted: This PR's base is out of sync with its target branch, so coverage data may include unrelated changes. Coverage increased (+10.0%) to 39.954%Details
Uncovered ChangesNo uncovered changes found. Coverage RegressionsNo coverage regressions found. Coverage Stats💛 - Coveralls |
SamboyCoding
approved these changes
Nov 28, 2026
SamboyCoding
force-pushed
the
fix-privatescope-fields
branch
from
November 28, 2026 14:43
6733230 to
d2dee1f
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Cpp2IL reads the metadata successfully, but Diffable C# export aborts when it encounters a field with PrivateScope visibility. The field formatter has no matching case and throws.
Example error, using a synthetic field name:
PrivateScope is a valid metadata value with access bits set to zero. For example, Obfuz's RVA allocator creates backing fields with:
No accessibility bits are supplied, so their visibility is PrivateScope.
Render these fields as
private, matching the existing method formatter. Instead of aborting export, a synthetic integer field can now be displayed as:This is a C# display approximation. Original attributes remain unchanged, and invalid visibility values still throw.
Added formatter and actual Diffable tests using the existing public fixture.