Re: [PATCH 0/3] Work around icc miscompilation
От | Xi Wang |
---|---|
Тема | Re: [PATCH 0/3] Work around icc miscompilation |
Дата | |
Msg-id | 51010D62.2010101@gmail.com обсуждение исходный текст |
Ответ на | Re: [PATCH 0/3] Work around icc miscompilation (Heikki Linnakangas <hlinnakangas@vmware.com>) |
Ответы |
Re: [PATCH 0/3] Work around icc miscompilation
|
Список | pgsql-hackers |
On 1/24/13 5:02 AM, Heikki Linnakangas wrote: > These patches look ok at a quick glance, but how do we ensure this kind > of problems don't crop back again in the future? Does icc give a warning > about these? Do we have a buildfarm animal that produces the warnings? > > If we fix these, can we stop using -frapv on gcc? Is there any way to > get gcc to warn about these? Thanks for reviewing. gcc has this -Wstrict-overflow option to warn against overflow checks that may be optimized away. The result in inaccurate: it may produce a large number of false warnings, and it may also miss many cases (esp. when gcc's value-range-propagation fails to compute variables' ranges). Not sure if other compilers have similar options. I find these broken checks using a static checker I'm developing, and only report cases that existing compilers do miscompile. If you are interested, I'll post a complete list of overflow checks in pgsql that invoke undefined behavior and thus may be killed by future compilers. I believe we can get rid of -fwrapv once we fix all such checks. - xi
В списке pgsql-hackers по дате отправления: