qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] This patch hunk will hang scripts/checkpatch.pl...


From: Dr. David Alan Gilbert
Subject: Re: [Qemu-devel] This patch hunk will hang scripts/checkpatch.pl...
Date: Tue, 3 Feb 2015 10:03:50 +0000
User-agent: Mutt/1.5.23 (2014-03-12)

* Peter Maydell (address@hidden) wrote:
> The following patch file (a cut down lump of an actual change
> I was making) seems to cause scripts/checkpatch.pl to hang.
> I find that script too opaque to try to debug, but I post the
> offending input here in case anybody else wishes to investigate.

That's entertaining; observations:
   1) The kernel's checkpatch doesn't hang on it (latest 3.19-rc6)
   2) Ours hangs in the annotate_values function, repeatedly going
around:
main::annotate_values(scripts/checkpatch.pl:859):
859:                    @av_paren_type = ('E') if ($#av_paren_type < 0);
  DB<2> 
main::annotate_values(scripts/checkpatch.pl:860):
860:                    print " <" . join('', @av_paren_type) .
861:                                    "> <$type> <$av_pending>" if 
($dbg_values > 1);
  DB<2> 
main::annotate_values(scripts/checkpatch.pl:862):
862:                    if ($cur =~ /^(\s+)/o) {
  DB<2> 
main::annotate_values(scripts/checkpatch.pl:879):
879:                            print "MODIFIER($1)\n" if ($dbg_values > 1);
  DB<2> 
main::annotate_values(scripts/checkpatch.pl:880):
880:                            $type = 'T';
  DB<2> 
main::annotate_values(scripts/checkpatch.pl:1040):
1040:                   if (defined $1) {
  DB<2> 
main::annotate_values(scripts/checkpatch.pl:1041):
1041:                           $cur = substr($cur, length($1));
  DB<2> 
main::annotate_values(scripts/checkpatch.pl:1042):
1042:                           $res .= $type x length($1);

$1=
$cur=float ## s ## _compare_quiet(float ## s a, float ## s b,                 \
$type=T
$res=ETTTT

    3) our annotate_values function is the same as the kernels except
       for one char difference in the 'cast' part, which doesn't fix it.

Dave

> ====begin====
> commit 4b3cf48c7fa455eb3b31dc844c959964e750a025
> Author: Peter Maydell <address@hidden>
> Date:   Mon Feb 2 18:47:16 2015 +0000
> 
>     This patch will hang checkpatch.pl.
> 
> diff --git a/fpu/softfloat.c b/fpu/softfloat.c
> index 1110a7e..ab6a93c 100644
> @@ -7218,13 +7325,13 @@ static inline int float ## s ##
> _compare_internal(float ## s a, float ## s b,\
>                                                                               
> \
>  int float ## s ## _compare(float ## s a, float ## s b, float_status *status) 
> \
>  {                                                                            
> \
> -    return float ## s ## _compare_internal(a, b, 0 STATUS_VAR);              
> \
> +    return float ## s ## _compare_internal(a, b, 0, status);              \
>  }                                                                            
> \
>                                                                               
> \
>  int float ## s ## _compare_quiet(float ## s a, float ## s b,                 
> \
>                                   float_status *status)                       
> \
>  {                                                                            
> \
> -    return float ## s ## _compare_internal(a, b, 1 STATUS_VAR);              
> \
> +    return float ## s ## _compare_internal(a, b, 1, status);              \
>  }
> 
>  COMPARE(32, 0xff)
> ====endit====
> 
> thanks
> -- PMM
> 
--
Dr. David Alan Gilbert / address@hidden / Manchester, UK



reply via email to

[Prev in Thread] Current Thread [Next in Thread]