mirror of
https://github.com/corda/corda.git
synced 2025-01-03 19:54:13 +00:00
fix stack unwinding from native methods for tails=true build
We can't clear t->trace->targetMethod until after findUnwindTarget has been called or we'll lose track of where we are on the stack.
This commit is contained in:
parent
e3662f13a9
commit
3ec4ef9bd2
@ -2190,6 +2190,9 @@ unwind(MyThread* t)
|
||||
object continuation;
|
||||
findUnwindTarget(t, &ip, &frame, &stack, &continuation);
|
||||
|
||||
t->trace->targetMethod = 0;
|
||||
t->trace->nativeMethod = 0;
|
||||
|
||||
transition(t, ip, stack, continuation, t->trace);
|
||||
|
||||
vmJump(ip, frame, stack, t, 0, 0);
|
||||
@ -7328,11 +7331,6 @@ invokeNative(MyThread* t)
|
||||
uint64_t result = 0;
|
||||
|
||||
t->trace->targetMethod = t->trace->nativeMethod;
|
||||
|
||||
THREAD_RESOURCE0(t, {
|
||||
static_cast<MyThread*>(t)->trace->targetMethod = 0;
|
||||
static_cast<MyThread*>(t)->trace->nativeMethod = 0;
|
||||
});
|
||||
|
||||
t->m->classpath->resolveNative(t, t->trace->nativeMethod);
|
||||
|
||||
@ -7355,6 +7353,9 @@ invokeNative(MyThread* t)
|
||||
|
||||
transition(t, getIp(t), stack, t->continuation, t->trace);
|
||||
|
||||
t->trace->targetMethod = 0;
|
||||
t->trace->nativeMethod = 0;
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user