Re: __builtin_types_compatible_p() is too accepting

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

 



n Wed, Nov 03, 2021 at 04:36:00PM +0300, Dan Carpenter wrote:
> The kunmap_atomic() has a BUILD_BUG_ON(__same_type((__addr), struct page *))
> which does __builtin_types_compatible_p(typeof(a), typeof(b)).
> 
> The problem is that Sparse considers "void *" compatible with
> "struct page *" so the BUILD_BUG_ON() triggers but GCC says they are not
> compatible (which is the desired behavior for the kernel).

Sorry, this was a bug in Smatch, not Sparse.

regards,
dan carpenter




[Index of Archives]     [Newbies FAQ]     [LKML]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Trinity Fuzzer Tool]

  Powered by Linux