Skip to content

Commit ae2d17b

Browse files
authored
define bool as Interop.BOOL to prevent upper bytes setting native bool (#92679)
1 parent 93cd68f commit ae2d17b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/coreclr/nativeaot/Runtime.Base/src/System/Runtime/InternalCalls.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,12 +62,12 @@ internal static class InternalCalls
6262
[RuntimeExport("RhCollect")]
6363
internal static void RhCollect(int generation, InternalGCCollectionMode mode, bool lowMemoryP = false)
6464
{
65-
RhpCollect(generation, mode, lowMemoryP);
65+
RhpCollect(generation, mode, lowMemoryP ? Interop.BOOL.TRUE : Interop.BOOL.FALSE);
6666
}
6767

6868
[DllImport(Redhawk.BaseName)]
6969
[UnmanagedCallConv(CallConvs = new Type[] { typeof(CallConvCdecl) })]
70-
private static extern void RhpCollect(int generation, InternalGCCollectionMode mode, bool lowMemoryP);
70+
private static extern void RhpCollect(int generation, InternalGCCollectionMode mode, Interop.BOOL lowMemoryP);
7171

7272
[RuntimeExport("RhGetGcTotalMemory")]
7373
internal static long RhGetGcTotalMemory()

0 commit comments

Comments
 (0)