未验证 提交 4b7d96a9 编写于 作者: J Jan Vorlicek 提交者: GitHub

Fix native stack size alignment on macOS arm64 (#51179)

We were setting an unaligned stack size to the MethodDesc of ILStub. The
lowest two bits actually overlap with two flags in the extended flags,
so the size is expected to be aligned at least to 4 to not to overwrite
the flags. On macOS arm64, the computed native stack size can be misaligned,
so this change adds explicit alignment before storing the stack size to
the MethodDesc.
上级 31036fea
......@@ -3660,6 +3660,8 @@ static void CreateNDirectStubWorker(StubState* pss,
}
#endif // TARGET_X86
nativeStackSize = ALIGN_UP(nativeStackSize, TARGET_POINTER_SIZE);
if (!FitsInU2(nativeStackSize))
COMPlusThrow(kMarshalDirectiveException, IDS_EE_SIGTOOCOMPLEX);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册