Re: OSX doesn't accept identical source/target for strcpy() anymore

Поиск
Список
Период
Сортировка
От Peter Geoghegan
Тема Re: OSX doesn't accept identical source/target for strcpy() anymore
Дата
Msg-id CAM3SWZTBtqdSAAVGJUhp2en4yf6R+E1sG_YvfXPCq6nzqk9ZEg@mail.gmail.com
обсуждение исходный текст
Ответ на Re: OSX doesn't accept identical source/target for strcpy() anymore  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: OSX doesn't accept identical source/target for strcpy() anymore  (Peter Eisentraut <peter_e@gmx.net>)
Список pgsql-hackers
On Mon, Oct 28, 2013 at 6:11 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Both gcc and glibc have been moving steadily in the direction of
> aggressively exploiting "undefined behavior" cases for optimization
> purposes.  I don't know if there is yet a platform where strncpy with
> src == dest behaves oddly, but we'd be foolish to imagine that it's
> not going to happen eventually.  If anything, Apple is probably doing
> us a service by making it obvious where we're failing to adhere to spec.

It's worth being aware of the fact that the upcoming GCC 4.9 release
is expected to ship with an "Undefined Behavior Sanitizer", as
described here:

http://gcc.gnu.org/gcc-4.9/changes.html

-- 
Peter Geoghegan



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: better atomics
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Detection of nested function calls