From 04eb14eb2d99205c2d1c8bcadafa8b0189f86da1 Mon Sep 17 00:00:00 2001 From: nobu Date: Wed, 11 May 2005 16:25:24 +0000 Subject: * eval.c (unknown_node): ignore broken NODE to get rid of accessing possibly inaccessible address. fixed: [ruby-dev:26122] should emit more useful information like [ruby-dev:26126], though. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@8426 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- eval.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'eval.c') diff --git a/eval.c b/eval.c index 0b884ebe2..55b97de97 100644 --- a/eval.c +++ b/eval.c @@ -2760,6 +2760,15 @@ class_prefix(self, cpath) NORETURN(static void return_jump _((VALUE))); NORETURN(static void break_jump _((VALUE))); +NORETURN(static void unknown_node _((NODE *))); + +static void +unknown_node(node) + NODE *volatile node; +{ + ruby_current_node = 0; + rb_bug("unknown node type %d", nd_type(node)); +} static VALUE rb_eval(self, n) @@ -3993,7 +4002,7 @@ rb_eval(self, n) break; default: - rb_bug("unknown node type %d", nd_type(node)); + unknown_node(node); } finish: CHECK_INTS; @@ -5842,7 +5851,7 @@ rb_call0(klass, recv, id, oid, argc, argv, body, nosuper) break; default: - rb_bug("unknown node type %d", nd_type(body)); + unknown_node(body); break; } POP_FRAME(); -- cgit