From 9495d03dc6cfb0d81fc8afa4453e5af930f13dfd Mon Sep 17 00:00:00 2001 From: Joel Dice Date: Sun, 4 Jan 2009 15:56:47 -0700 Subject: [PATCH] explicitly load jump target in tableswitch to avoid retaining stale memory sites --- src/compile.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/compile.cpp b/src/compile.cpp index af58cbc18c..bb676b5fac 100644 --- a/src/compile.cpp +++ b/src/compile.cpp @@ -3511,8 +3511,9 @@ compile(MyThread* t, Frame* initialFrame, unsigned ip, saveStateAndCompile(t, frame, defaultIp); - c->jmp(c->memory(start, 0, c->sub(4, c->constant(bottom), key), - BytesPerWord)); + c->jmp(c->load(BytesPerWord, BytesPerWord, + c->memory(start, 0, c->sub(4, c->constant(bottom), key), + BytesPerWord))); Compiler::State* state = c->saveState();