From b4687ec0d63d2aceba8b30f22bd884644d4ac681 Mon Sep 17 00:00:00 2001 From: Rudolf Polzer Date: Mon, 30 Apr 2012 14:11:18 +0200 Subject: [PATCH] fix the "error" handlign --- misc/tools/progs-analyzer.pl | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/misc/tools/progs-analyzer.pl b/misc/tools/progs-analyzer.pl index 9394cf17..f9c6411d 100644 --- a/misc/tools/progs-analyzer.pl +++ b/misc/tools/progs-analyzer.pl @@ -269,6 +269,18 @@ sub run_nfa($$$$$$) { last; } + elsif($c->{iscall}) + { + my $func = $s->{a}; + my $funcid = $progs->{globals}[$func]{v}{int}; + my $funcobj = $progs->{functions}[$funcid]; + if($funcobj && $funcobj->{first_statement} < 0) # builtin + { + my $def = $progs->{globaldef_byoffset}->($func); + last + if $def->{debugname} eq 'error'; + } + } elsif($c->{isjump}) { if($c->{isconditional}) @@ -769,12 +781,6 @@ sub find_uninitialized_locals($$) } } } - else # builtin - { - my $def = $progs->{globaldef_byoffset}->($func); - return 1 - if $def->{debugname} eq 'error'; - } } return 0; -- 2.39.2