From: Rudolf Polzer Date: Mon, 31 Dec 2012 12:12:23 +0000 (+0100) Subject: warn on invalid opcodes if they are reached X-Git-Tag: xonotic-v0.7.0~18 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=26cdc110232ee12dbe930a12eb372eaf508f218c;p=xonotic%2Fxonotic.git warn on invalid opcodes if they are reached --- 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->{$_};