Skip to content

Commit

Permalink
JACOBIN-300 Fix error in how nulls were reported in tracing info
Browse files Browse the repository at this point in the history
  • Loading branch information
platypusguy committed Aug 7, 2023
1 parent 72c50e0 commit 0832201
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions src/jvm/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,8 @@ import (
"jacobin/types"
"jacobin/util"
"math"
"runtime/debug"
"strconv"
"strings"
"syscall"
"unsafe"
)

Expand Down Expand Up @@ -2335,10 +2333,13 @@ func pop(f *frames.Frame) interface{} {
case *object.Object:
obj := value.(*object.Object)
if obj == nil {
traceInfo = fmt.Sprintf("pop: TOS value is type *object.Object but obj is nil")
_ = log.Log(traceInfo, log.SEVERE)
debug.PrintStack()
syscall.Exit(1)
traceInfo = fmt.Sprintf("%74s", "POP TOS:") +
fmt.Sprintf("%3d null", f.TOS)
break
// traceInfo = fmt.Sprintf("pop: TOS value is type *object.Object but obj is nil")
// _ = log.Log(traceInfo, log.SEVERE)
// debug.PrintStack()
// syscall.Exit(1)
}
if len(obj.Fields) > 0 {
if obj.Fields[0].Ftype == "[B" {
Expand Down

0 comments on commit 0832201

Please sign in to comment.