Permalink
Browse files

Ensure we copy the data from the thread data into the current frame

  • Loading branch information...
1 parent 79209c9 commit 5d98d26c52988b404f37fa10af83870ce320b1d3 @dbussink dbussink committed Nov 28, 2012
Showing with 18 additions and 2 deletions.
  1. +4 −2 vm/instructions.cpp
  2. +12 −0 vm/unwind_info.cpp
  3. +2 −0 vm/unwind_info.hpp
View
6 vm/instructions.cpp
@@ -213,7 +213,7 @@ Object* MachineCode::uncommon_interpreter(STATE,
native_int sp,
CallFrame* const method_call_frame,
jit::RuntimeDataHolder* rd,
- UnwindInfoSet& unwinds)
+ UnwindInfoSet& thread_unwinds)
{
MachineCode* mc = method_call_frame->compiled_code->machine_code();
@@ -239,6 +239,7 @@ Object* MachineCode::uncommon_interpreter(STATE,
Object** stack_ptr = call_frame->stk + sp;
+ UnwindInfoSet unwinds(thread_unwinds);
continue_to_run:
try {
@@ -502,7 +503,7 @@ Object* MachineCode::debugger_interpreter_continue(STATE,
CallFrame* const call_frame,
int sp,
InterpreterState& is,
- UnwindInfoSet& unwinds)
+ UnwindInfoSet& thread_unwinds)
{
#include "vm/gen/instruction_locations.hpp"
@@ -512,6 +513,7 @@ Object* MachineCode::debugger_interpreter_continue(STATE,
Object** stack_ptr = call_frame->stk + sp;
+ UnwindInfoSet unwinds(thread_unwinds);
continue_to_run:
try {
View
12 vm/unwind_info.cpp
@@ -2,6 +2,18 @@
namespace rubinius {
+ UnwindInfoSet::UnwindInfoSet(const UnwindInfoSet& other) {
+ for(int i = 0; i < kMaxUnwindInfos; ++i) {
+ unwinds_[i] = other.unwinds_[i];
+ }
+ if(other.overflow_) {
+ overflow_ = new UnwindOverflow(*other.overflow_);
+ } else {
+ overflow_ = NULL;
+ }
+ current_ = other.current_;
+ }
+
void UnwindInfoSet::overflow_set_unwind_info(int i, uint32_t target_ip, int stack_depth, UnwindType type) {
if(!overflow_) {
overflow_ = new UnwindOverflow();
View
2 vm/unwind_info.hpp
@@ -54,6 +54,8 @@ namespace rubinius {
}
}
+ UnwindInfoSet(const UnwindInfoSet& other);
+
int has_unwinds() {
return current_ > 0;
}

0 comments on commit 5d98d26

Please sign in to comment.