Closed rajeshmajumdar closed 2 years ago
I am so stupid, the error was due to implementation in debug.c
, it was at this line printf("%-16s %4d -> %d\n", name, offset, offset + 3 + sign * jump);
. Here instead of %d\n
it is suppose to be %n
. Thanks to lldb.
For some reason, in
emitJump()
function incompiler.c
, when I am callingemitByte(OP_JUMP_IF_FALSE)
it is throwing asegfault error
, while emitting any other opcode it's working just fine.It's never reaching
vm.c
, I banged my head around for a week now I don't know what's going wrong here.