mirror of
https://github.com/nspcc-dev/neo-go.git
synced 2024-11-22 19:29:39 +00:00
vm: use proper estack for exception handler
v.estack might be some inner invoked contract and its stack must not be used for exception handler set up by higher-order contract.
This commit is contained in:
parent
cb64957af5
commit
8e7f65be17
1 changed files with 1 additions and 0 deletions
|
@ -1754,6 +1754,7 @@ func (v *VM) handleException() {
|
||||||
v.istack = v.istack[:len(v.istack)-1]
|
v.istack = v.istack[:len(v.istack)-1]
|
||||||
v.unloadContext(ctx)
|
v.unloadContext(ctx)
|
||||||
}
|
}
|
||||||
|
v.estack = ictx.sc.estack
|
||||||
if ectx.State == eTry && ectx.HasCatch() {
|
if ectx.State == eTry && ectx.HasCatch() {
|
||||||
ectx.State = eCatch
|
ectx.State = eCatch
|
||||||
v.estack.PushItem(v.uncaughtException)
|
v.estack.PushItem(v.uncaughtException)
|
||||||
|
|
Loading…
Reference in a new issue