[cfe-dev] Possible clang bug with -O2, wrong if branch entered, in clang version 2.1 (tags/Apple/clang-163.7.1)

Salvatore Sanfilippo antirez at gmail.com
Tue Feb 21 09:32:21 PST 2012


Everything fine after this commit:
https://github.com/antirez/redis/commit/7c96b467c1f882874f80403101ec96ddaf624f1a

Sorry clang!

Thanks for the help,
Salvatore

p.s. clang static checker was able to find a few real bugs in the
Redis source code, and the output is awesome.

On Tue, Feb 21, 2012 at 3:45 PM, Salvatore Sanfilippo <antirez at gmail.com> wrote:
> Hello,
>
> today I tried to compile Redis with clang, and a test was failing
> without apparent reasons.
> I investigated a bit further, and isolated the bug in the following
> code fragment:
>
> https://gist.github.com/187687
>
> I verified the bug only in Apple's clang, I'm not 100% sure this is
> the right place where to submit such a bug report. If this is the
> wrong place, I'm sorry, please point me in the right direction.
>
> I'm not subscribed to the list so if you need further informations
> please include my address in CC.
>
> Thank you in advance,
> Salvatore
>
> --
> Salvatore 'antirez' Sanfilippo
> open source developer - VMware
>
> http://invece.org
> "We are what we repeatedly do. Excellence, therefore, is not an act,
> but a habit." -- Aristotele



-- 
Salvatore 'antirez' Sanfilippo
open source developer - VMware

http://invece.org
"We are what we repeatedly do. Excellence, therefore, is not an act,
but a habit." -- Aristotele



More information about the cfe-dev mailing list