Re: [PATCH] fsmonitor: avoid signed integer overflow / infinite loop

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

 



On Sun, Jun 16, 2019 at 6:17 PM Derrick Stolee <stolee@xxxxxxxxx> wrote:
>
> Thanks for catching this. I wonder if there is a compiler setting or
> static analysis that caught this so we can avoid the issue in the future.

-Wsign-compare would definitely raise a warning about this, but we have
currently 956 of those in master (which is why they are currently being
suppressed), with about 112 of those in similar code.

it is important to also mention that cache_nr/active_nr is unsigned
since the first
version of git, so the issue isn't new, neither specific to fsmonitor,
and as you
pointed out, unlikely to manifest itself.

Carlo



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux