Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
missing null check
  • Loading branch information
VSadov committed Mar 23, 2023
commit 7317903bd91fd520afc7d9853524e1070f0d61d6
Original file line number Diff line number Diff line change
Expand Up @@ -446,7 +446,8 @@ private static unsafe int GetInstanceGCDescSize(TypeBuilderState state, MethodTa
var gcBitfield = state.InstanceGCLayout;
if (isArray)
{
if (state.IsArrayOfReferenceTypes || IsAllGCPointers(gcBitfield))
if (state.IsArrayOfReferenceTypes ||
(gcBitfield != null && IsAllGCPointers(gcBitfield)))
{
// For efficiency this is special cased and encoded as one serie
return 3 * sizeof(IntPtr);
Expand Down