dotnet/runtime

Add test coverage for ECMA-335 corner around non-optional Lists

オープン

#26,096 opened on 2018/05/07

 (4 件のコメント) (0 件のリアクション) (0 人の担当者)C# (5,445 件のフォーク)batch import
area-System.Reflection.Metadatahelp wantedtest-enhancement

Repository metrics

Stars
 (17,886 個のスター)
PR merge metrics
 (平均マージ 12d 11h) (30d で 661 merged PRs)

説明

Use System.Reflection.Metadata to emit the following:

  • A module with exactly 0xFFFF methods
  • The last type in the module has no methods

This will hit a corner case in the ECMA-335 spec where the TypeDef record for the last type should end up with a MethodList value of 0x10000, but per the spec, the MethodList column is only 2 bytes wide (because the method count fits in 2 bytes), making the value fall out of range.

This also affects other similar columns, such as TypeDef.FieldList, and MethodDef.ParamList.

Per the spec, null might be a legal value to put there in that case.

コントリビューターガイド