From 26cdc110232ee12dbe930a12eb372eaf508f218c Mon Sep 17 00:00:00 2001 From: Rudolf Polzer Date: Mon, 31 Dec 2012 13:12:23 +0100 Subject: [PATCH] warn on invalid opcodes if they are reached --- misc/tools/progs-analyzer.pl | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/misc/tools/progs-analyzer.pl b/misc/tools/progs-analyzer.pl index 75e9b84f..e8d7a212 100755 --- a/misc/tools/progs-analyzer.pl +++ b/misc/tools/progs-analyzer.pl @@ -127,6 +127,10 @@ sub checkop($) { return { a => 'inglobal', b => 'inglobalfunc' }; } + if($op =~ /^INVALID#/) + { + return { isinvalid => 1 }; + } return { a => 'inglobal', b => 'inglobal', c => 'outglobal' }; } @@ -675,6 +679,10 @@ sub find_uninitialized_locals($$) } } + if($c->{isinvalid}) + { + ++$warned{$ip}{''}{"Invalid opcode"}; + } for(qw(a b c)) { my $type = $c->{$_}; -- 2.39.2