提交 36e14209 编写于 作者: A Andrew Scheidecker 提交者: Matt Witherspoon

Fix crash when deleting a partially initialized MemoryInstance after its...

Fix crash when deleting a partially initialized MemoryInstance after its address-space allocation fails
上级 ef2371f6
......@@ -20,7 +20,7 @@ namespace Runtime
const Uptr alignmentPages = alignmentBytes >> Platform::getPageSizeLog2();
outUnalignedNumPlatformPages = numAllocatedVirtualPages + alignmentPages;
outUnalignedBaseAddress = Platform::allocateVirtualPages(outUnalignedNumPlatformPages);
if(!outUnalignedBaseAddress) { return nullptr; }
if(!outUnalignedBaseAddress) { outUnalignedNumPlatformPages = 0; return nullptr; }
else { return (U8*)((Uptr)(outUnalignedBaseAddress + alignmentBytes - 1) & ~(alignmentBytes - 1)); }
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册