Skip to content

Commit 48ec2b0

Browse files
davmasonjkotas
authored andcommitted
fix for HasCriticalFinalizer in local gc (dotnet#17369)
1 parent 9496bc0 commit 48ec2b0

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

src/gc/env/gcenv.object.h

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,12 @@ class ObjHeader
3636

3737
static_assert(sizeof(ObjHeader) == sizeof(uintptr_t), "this assumption is made by the VM!");
3838

39-
#define MTFlag_ContainsPointers 0x0100
40-
#define MTFlag_HasFinalizer 0x0010
41-
#define MTFlag_IsArray 0x0008
42-
#define MTFlag_Collectible 0x1000
43-
#define MTFlag_HasComponentSize 0x8000
39+
#define MTFlag_ContainsPointers 0x0100
40+
#define MTFlag_HasCriticalFinalizer 0x0800
41+
#define MTFlag_HasFinalizer 0x0010
42+
#define MTFlag_IsArray 0x0008
43+
#define MTFlag_Collectible 0x1000
44+
#define MTFlag_HasComponentSize 0x8000
4445

4546
class MethodTable
4647
{
@@ -103,7 +104,7 @@ class MethodTable
103104

104105
bool HasCriticalFinalizer()
105106
{
106-
return false;
107+
return (m_flags & MTFlag_HasCriticalFinalizer) != 0;
107108
}
108109

109110
bool IsArray()

0 commit comments

Comments
 (0)