Linux-Sparse Archive on lore.kernel.org
 help / color / Atom feed
* Sparse improvements & regressions for Linux v5.7-rc1 -> v5.8-rc1
@ 2020-07-08  0:06 Luc Van Oostenryck
  2020-07-08  9:59 ` Dan Carpenter
  0 siblings, 1 reply; 3+ messages in thread
From: Luc Van Oostenryck @ 2020-07-08  0:06 UTC (permalink / raw)
  To: linux-sparse; +Cc: linux-kernel

I've finally written a silly script to easily compare my tests
of Sparse on the kernel. So, it's now easy to share those results.

It's a comparison of Sparse's unique warnings between v5.7-rc1 &
v5.8-rc1 on x86-64 (defconfig + allyesconfig). The results are
quite similar on other architectures.

Note that the differences can be caused by changes in the kernel
code or in Sparse code.

Have fun.

- 20114 19249 Total

+    95   161 Initializer entry defined twice
-   152    98 Using plain integer as NULL pointer
    394   394 advancing past deep designator
      4     4 arithmetics on pointers to functions
+    15    16 bad assignment to restricted type
      4     4 cast between address spaces (<asn:3> -> <asn:4>)
+     0    38 cast from non-scalar
-   288   276 cast from restricted type
-    43    41 cast removes address space '<asn:1>' of expression
    142   142 cast removes address space '<asn:2>' of expression
      1     1 cast removes address space '<asn:3>' of expression
+    10    15 cast removes address space '<asn:4>' of expression
+    13    51 cast to non-scalar
-  4796  4512 cast to restricted type
+   595   609 cast truncates bits from constant value
+   335   349 context imbalance - different lock contexts for basic block
-   463   453 context imbalance - unexpected unlock
-   198   189 context imbalance - wrong count at exit
+   117   118 dereference of noderef expression
+    10    13 dubious: !x & y
+     0     1 dubious: !x | !y
      6     6 dubious: !x | y
+    56    57 dubious: x & !y
     21    21 dubious: x | !y
+    17    21 function with external linkage has definition
      2     2 implicit cast from nocast type
+   497   500 incompatible types in comparison expression (different address spaces)
      3     3 incompatible types in comparison expression (different base types)
      1     1 incompatible types in comparison expression (different type sizes)
+     5     6 incompatible types in conditional expression (different base types)
+  1216  1225 incorrect type in argument (different address spaces)
-   528   515 incorrect type in argument (different base types)
+     0     5 incorrect type in argument (different modifiers)
-    11    10 incorrect type in argument (different type sizes)
+     0     1 incorrect type in argument (incompatible argument (different address spaces))
      1     1 incorrect type in argument (incompatible argument (different base types))
+   369   388 incorrect type in assignment (different address spaces)
-  5607  4945 incorrect type in assignment (different base types)
      1     1 incorrect type in assignment (different modifiers)
+   139   141 incorrect type in initializer (different address spaces)
-   141   132 incorrect type in initializer (different base types)
+     4     7 incorrect type in initializer (incompatible argument (different address spaces))
-    27    26 incorrect type in return expression (different address spaces)
-    30    26 incorrect type in return expression (different base types)
-   516   451 invalid assignement
     37    37 invalid bitfield specifier for type restricted type.
     13    13 invalid initializer
      1     1 marked inline, but without a definition
      1     1 memcpy with byte count of ...
      5     5 memset with byte count of ...
-    10     0 missing braces around initializer
      7     7 mixed bitwiseness
     10    10 mixing different enum types:
      1     1 multiple address spaces given
-     2     1 no newline at end of file
      1     1 non-scalar type in conditional:
-     1     0 preprocessor token offsetof redefined
+   948   959 restricted type degrades to integer
+    42    43 return expression in void function
      3     3 shift count is (-1)
      5     5 shift too big for type
     12    12 static assertion failed
      5     5 subtraction of different types can't work (different address spaces)
+    23    24 subtraction of functions? Share your drugs
      1     1 switch with no cases
+     0     5 symbol redeclared with different type (incompatible argument (different address spaces))
+  2109  2135 symbol was not declared. Should it be static?
      1     1 too long token expansion
      3     3 trying to concatenate long character string (8191 bytes max)

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Sparse improvements & regressions for Linux v5.7-rc1 -> v5.8-rc1
  2020-07-08  0:06 Sparse improvements & regressions for Linux v5.7-rc1 -> v5.8-rc1 Luc Van Oostenryck
@ 2020-07-08  9:59 ` Dan Carpenter
  2020-07-08 10:43   ` Luc Van Oostenryck
  0 siblings, 1 reply; 3+ messages in thread
From: Dan Carpenter @ 2020-07-08  9:59 UTC (permalink / raw)
  To: Luc Van Oostenryck; +Cc: linux-sparse, linux-kernel

On Wed, Jul 08, 2020 at 02:06:51AM +0200, Luc Van Oostenryck wrote:
> I've finally written a silly script to easily compare my tests
> of Sparse on the kernel. So, it's now easy to share those results.
> 
> It's a comparison of Sparse's unique warnings between v5.7-rc1 &
> v5.8-rc1 on x86-64 (defconfig + allyesconfig). The results are
> quite similar on other architectures.
> 
> Note that the differences can be caused by changes in the kernel
> code or in Sparse code.
> 
> Have fun.
> 

This is quite fun!  Could you post the raw errors from the v5.8-rc1
kernel as well?  Probably it's too big for LKML, so it would have to
be posted to pastebin or something.

regards,
dan carpenter


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Sparse improvements & regressions for Linux v5.7-rc1 -> v5.8-rc1
  2020-07-08  9:59 ` Dan Carpenter
@ 2020-07-08 10:43   ` Luc Van Oostenryck
  0 siblings, 0 replies; 3+ messages in thread
From: Luc Van Oostenryck @ 2020-07-08 10:43 UTC (permalink / raw)
  To: Dan Carpenter; +Cc: linux-sparse, linux-kernel

On Wed, Jul 08, 2020 at 12:59:04PM +0300, Dan Carpenter wrote:
> On Wed, Jul 08, 2020 at 02:06:51AM +0200, Luc Van Oostenryck wrote:
> > I've finally written a silly script to easily compare my tests
> > of Sparse on the kernel. So, it's now easy to share those results.
> > 
> > It's a comparison of Sparse's unique warnings between v5.7-rc1 &
> > v5.8-rc1 on x86-64 (defconfig + allyesconfig). The results are
> > quite similar on other architectures.
> > 
> > Note that the differences can be caused by changes in the kernel
> > code or in Sparse code.
> > 
> > Have fun.
> > 
> 
> This is quite fun!  Could you post the raw errors from the v5.8-rc1
> kernel as well?  Probably it's too big for LKML, so it would have to
> be posted to pastebin or something.

Yes, even compressed it's too big.
I've added them in my dev tree on github:
	https://github.com/lucvoo/sparse-dev/commits/logs
It's just the last commit in the subdirectory 'Logs'.
I've added the raw and the cooked form.

Have fun,
-- Luc

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, back to index

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-08  0:06 Sparse improvements & regressions for Linux v5.7-rc1 -> v5.8-rc1 Luc Van Oostenryck
2020-07-08  9:59 ` Dan Carpenter
2020-07-08 10:43   ` Luc Van Oostenryck

Linux-Sparse Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-sparse/0 linux-sparse/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-sparse linux-sparse/ https://lore.kernel.org/linux-sparse \
		linux-sparse@vger.kernel.org
	public-inbox-index linux-sparse

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-sparse


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git