From acd254544c04b46ad4c29c49e7f666d497e94265 Mon Sep 17 00:00:00 2001 From: Joel Dice Date: Tue, 3 Jul 2007 09:38:35 -0600 Subject: [PATCH] zero locals when invoking method --- src/vm.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/vm.cpp b/src/vm.cpp index ad112a0c56..2bed183768 100644 --- a/src/vm.cpp +++ b/src/vm.cpp @@ -4159,6 +4159,11 @@ run(Thread* t) frame = makeFrame(t, code, frame, 0, base); code = methodCode(t, code); + memset(stack + base + parameterCount, + 0, + (codeMaxLocals(t, methodCode(t, code)) - parameterCount) + * BytesPerWord); + sp = base + codeMaxLocals(t, methodCode(t, code)); } } goto loop;