-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Closed
Labels
area-CodeGen-coreclrCLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMICLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI
Milestone
Description
Hello folks,
Apologies, it's not a fully reproducible bug as we haven't tried yet to reproduce it with a simpler sample, but we have a suspicion.
We are investigating an error where we have the GC marking of frozen objects gc_heap::mark_ro_segments()
that is crashing.
One place that we are curious about is in TryAllocateFrozenSzArray
:
runtime/src/coreclr/vm/gchelpers.cpp
Lines 516 to 520 in 7486be8
if (pArrayMT->ContainsPointers() && cElements > 0) | |
{ | |
// For arrays with GC pointers we can only work with empty arrays | |
return NULL; | |
} |
Where it seems that we could allow to allocate an empty array for collectible MethodTable in the Frozen heap. Shouldn't it be something like this instead?
if (pArrayMT->Collectible() || (pArrayMT->ContainsPointers() && cElements > 0))
{
// For arrays with GC pointers we can only work with empty arrays
return NULL;
}
Before we investigate this further, any thoughts?
cc: @EgorBo
Metadata
Metadata
Labels
area-CodeGen-coreclrCLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMICLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI