From e4ccd13205cb42e2dca6120d4b702b30f8fd6a8f Mon Sep 17 00:00:00 2001 From: Yichao Yu Date: Tue, 21 Jul 2015 12:30:34 -0400 Subject: [PATCH] Try to fix infinite loop in windows memory manager. Close #7942 --- src/debuginfo.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/debuginfo.cpp b/src/debuginfo.cpp index 5388dbb1611fd..eadd98437a638 100644 --- a/src/debuginfo.cpp +++ b/src/debuginfo.cpp @@ -969,6 +969,8 @@ class JITMemoryManagerWin : public JITMemoryManager { virtual uint8_t *getGOTBase() const { return JMM->getGOTBase(); } virtual uint8_t *startFunctionBody(const Function *F, uintptr_t &ActualSize) { + if (ActualSize == 0) + ActualSize += 64; ActualSize += 48; uint8_t *mem = JMM->startFunctionBody(F,ActualSize); ActualSize -= 48;