mirror of
https://github.com/corda/corda.git
synced 2025-03-16 17:15:19 +00:00
fix stack walker to properly handle the case of a native method calling another native method
This commit is contained in:
parent
c7d679467f
commit
9e8e4b3de7
@ -213,22 +213,25 @@ class MyStackWalker: public Processor::StackWalker {
|
||||
base = *static_cast<void**>(base);
|
||||
ip_ = *static_cast<void**>(stack);
|
||||
method_ = methodForIp(t, *static_cast<void**>(stack));
|
||||
if (method_ == 0) {
|
||||
if (trace and trace->stack) {
|
||||
base = trace->base;
|
||||
stack = static_cast<void**>(trace->stack);
|
||||
ip_ = *static_cast<void**>(stack);
|
||||
method_ = methodForIp(t, *static_cast<void**>(stack));
|
||||
nativeMethod = trace->nativeMethod;
|
||||
trace = trace->next;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
|
||||
if (method_ or nativeMethod) {
|
||||
return true;
|
||||
} else if (trace and trace->stack) {
|
||||
base = trace->base;
|
||||
stack = static_cast<void**>(trace->stack);
|
||||
ip_ = *static_cast<void**>(stack);
|
||||
method_ = methodForIp(t, *static_cast<void**>(stack));
|
||||
nativeMethod = trace->nativeMethod;
|
||||
trace = trace->next;
|
||||
|
||||
expect(t, method_ or nativeMethod);
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
virtual object method() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user