| От | Tom Lane |
|---|---|
| Тема | Anyone for adding -fwrapv to our standard CFLAGS? |
| Дата | |
| Msg-id | 1689.1134422394@sss.pgh.pa.us обсуждение исходный текст |
| Ответы |
Re: Anyone for adding -fwrapv to our standard CFLAGS?
|
| Список | pgsql-hackers |
It seems that gcc is up to some creative reinterpretation of basic C semantics again; specifically, you can no longer trust that traditional C semantics of integer overflow hold: https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=175462 While I don't think we are anywhere using exactly the same trick that the referenced mysql code is using, it certainly seems likely to me that a compiler that is willing to replace "x < 0 && -x < 0" with "false" might be able to break some of the integer overflow checks we do use. I think we need to add -fwrapv to CFLAGS anytime the compiler will take it, same as we recently started doing with -fno-strict-aliasing. Comments? regards, tom lane
В списке pgsql-hackers по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера