making stack trace check for null procedures

This commit is contained in:
Alex Shinn 2010-12-29 16:13:30 +09:00
parent 74185fbe11
commit c163599685

2
vm.c
View file

@ -25,7 +25,7 @@ void sexp_stack_trace (sexp ctx, sexp out) {
if (! sexp_oportp(out)) out = sexp_current_error_port(ctx); if (! sexp_oportp(out)) out = sexp_current_error_port(ctx);
for (i=fp; i>4; i=sexp_unbox_fixnum(stack[i+3])) { for (i=fp; i>4; i=sexp_unbox_fixnum(stack[i+3])) {
self = stack[i+2]; self = stack[i+2];
if (sexp_procedurep(self)) { if (self && sexp_procedurep(self)) {
sexp_write_string(ctx, " called from ", out); sexp_write_string(ctx, " called from ", out);
bc = sexp_procedure_code(self); bc = sexp_procedure_code(self);
if (sexp_truep(sexp_bytecode_name(bc))) if (sexp_truep(sexp_bytecode_name(bc)))