Conversation
A type id can name a type the runtime type table has no entry for, and GetType answers null for it. Every place GetFullName composed a name out of another type id wrote through that null and took the process down with a segfault: a tuple's field types and splat members, a base type, a pointer's and a ref's and a sized array's element, an array's element, and a specialization's unspecialized form, which was also a hard cast that trapped on null. An unresolvable reference now reads as "???", which is the placeholder an unresolvable outer type already used. This kills any walk over Type.Types that names what it finds, which is how a reflection driven registry resolves a type by name: one tuple whose field type was never emitted ends the process with no assertion text. A const String expression's literal is guarded for a null entry as well, but only for that: String.GetById indexes the literal table unchecked, so an id BEYOND the table still reads out of bounds. Catching that needs a count emitted beside the table, so it is left alone here and the call site says so.
jayrulez
force-pushed
the
fix/type-getfullname-null-typeref
branch
from
September 25, 2026 03:33
f5bad8f to
e44847f
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.
A type id can name a type the runtime type table has no entry for, and GetType answers null for it. Every place GetFullName composed a name out of another type id wrote through that null and took the process down with a segfault: a tuple's field types and splat members, a base type, a pointer's and a ref's and a sized array's element, an array's element, and a specialization's unspecialized form, which was also a hard cast that trapped on null.
An unresolvable reference now reads as "???", which is the placeholder an unresolvable outer type already used.
This kills any walk over Type.Types that names what it finds, which is how a reflection driven registry resolves a type by name: one tuple whose field type was never emitted ends the process with no assertion text.
A const String expression's literal is guarded for a null entry as well, but only for that: String.GetById indexes the literal table unchecked, so an id BEYOND the table still reads out of bounds. Catching that needs a count emitted beside the table, so it is left alone here and the call site says so.
@bfiete please let me know if I should pursue the count emission.