[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CA+55aFxs=mF9vEMh1JN=UpF4UZ9-ojiN==PW8PJNWQ6D18NWFg@mail.gmail.com>
Date: Fri, 5 Dec 2014 10:50:19 -0800
From: Linus Torvalds <torvalds@...ux-foundation.org>
To: Dan Carpenter <dan.carpenter@...cle.com>
Cc: Sasha Levin <sasha.levin@...cle.com>,
Kernel Mailing List <linux-kernel@...r.kernel.org>,
Andrew Morton <akpm@...ux-foundation.org>,
Ingo Molnar <mingo@...nel.org>
Subject: Re: [RFC 1/2] compiler: use compiler to detect integer overflows
On Fri, Dec 5, 2014 at 1:54 AM, Dan Carpenter <dan.carpenter@...cle.com> wrote:
>
> There are some false positives which do:
>
> if ((u16)(u16_foo + u16_bar) < u16_foo) {
Actually, the worse false positive is the ones that are pointer comparisons.
A compiler that does those as signed is just broken. It's happened,
but it's *still* completely broken.
Linus
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists