diff --git a/vm/vm_jit.go b/vm/vm_jit.go index 76b5776e7d..6cbee96d60 100644 --- a/vm/vm_jit.go +++ b/vm/vm_jit.go @@ -149,11 +149,12 @@ func (self *JitVm) Run(me, caller ContextRef, code []byte, value, gas, price *bi r := C.evmjit_run(unsafe.Pointer(&data), unsafe.Pointer(self)) //fmt.Printf("JIT result: %d\n", r) - gasLeft := llvm2big(&data.elems[Gas]) // TODO: Set value directly to gas instance - gas.Set(gasLeft) - if r >= 100 { err = errors.New("OOG from JIT") + gas.SetInt64(0) // Set gas to 0, JIT do not bother + } else { + gasLeft := llvm2big(&data.elems[Gas]) // TODO: Set value directly to gas instance + gas.Set(gasLeft) } return ret, err