From: Rudolf Polzer Date: Wed, 30 May 2012 12:58:10 +0000 (+0200) Subject: detect NOP jumps, and trivial endless loop X-Git-Tag: xonotic-v0.7.0~54^2~3 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=c934db33bdc01f38cefb462e65ad5c43ac2560dc;p=xonotic%2Fxonotic.git detect NOP jumps, and trivial endless loop --- diff --git a/misc/tools/progs-analyzer.pl b/misc/tools/progs-analyzer.pl index 6ba7de89..061f4485 100644 --- a/misc/tools/progs-analyzer.pl +++ b/misc/tools/progs-analyzer.pl @@ -741,6 +741,13 @@ sub find_uninitialized_locals($$) $write->($ofs+1); $write->($ofs+2); } + elsif($type eq 'ipoffset') + { + push @{$warned{$ip}{$_}}, "Endless loop" + if $ofs == 0; + push @{$warned{$ip}{$_}}, "No-operation jump" + if $ofs == 1; + } } if($c->{iscall}) {