fix(managed): reject non-method signature headers and invalid TypeRef scopes

The method signature header reader now owns the calling-convention rule
that only FNPTR applied: FIELD, LOCAL_SIG, PROPERTY, and GENERICINST
headers, the reserved bit, and EXPLICITTHIS without HASTHIS are malformed.
A MethodSpec whose method has a PROPERTY header is no longer accepted as a
generic method, and member signatures with such headers no longer decode
as methods.

The type-name lookup validates a TypeRef's ResolutionScope coded index and
reports an out-of-range scope as invalid-row, keeping the readable name.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
NickandClaude Opus 5.5 committed 2026-10-12 13:24:07 +00:00
1 parent 02bad95bee
commit 6fef3eaabe
5 files changed
+77 -25

No files matched your search

+3 -3
View File
@@ -105,9 +105,9 @@ generic method it instantiates. A field access is named only by a field or a
field-signature MemberRef. TypeSpec and MethodSpec blobs are decoded with the
member-signature grammar, and a MethodSpec must instantiate a generic method
with as many type arguments as it declares. Malformed or unsupported rows and
blobs, and arity mismatches, make coverage partial; a readable MethodSpec
method column keeps its name. Older member Evidence without these fields reads
them as `null`: unknown.
blobs, and arity mismatches, make coverage partial. A readable MethodSpec
method column, or a TypeRef whose resolution scope is invalid, keeps its name.
Older member Evidence without these fields reads them as `null`: unknown.
## Analysis objective