Re: GIN FailedAssertions on Itanium2 with Intel compiler
От | Teodor Sigaev |
---|---|
Тема | Re: GIN FailedAssertions on Itanium2 with Intel compiler |
Дата | |
Msg-id | 44F6B059.2040701@sigaev.ru обсуждение исходный текст |
Ответ на | GIN FailedAssertions on Itanium2 with Intel compiler ("Sergey E. Koposov" <math@sai.msu.ru>) |
Ответы |
Re: GIN FailedAssertions on Itanium2 with Intel compiler
Re: GIN FailedAssertions on Itanium2 with Intel compiler |
Список | pgsql-hackers |
Huh, it's a over-optimization by icc on Itanium. With -00 or -02 there is no any problem, only -O2 produces such effect. The problem is in code at lines 125-172 in ginutils.c: static bool needUnique = false; int cmpFunc(...) {...if (...) needUnique = true;... } ... needUnique = false; qsort(...., cmpFunc); if (needUnique) .... And, needUnique was setted to true in last call of cmpFunc (by accident, in fact), so between last call and checking of needUnique there isn't any call of function. Insertion after qsort() any call (elog, for example) solves the problem. If needUnique is marked as "volatile", all is ok too. But this way doesn't seem to me as reasonable, because there is a lot of places with potentially the same problem... and thats may cause unpredictable failures. May be, better way is limiting optimization level on Itanium with icc. -- Teodor Sigaev E-mail: teodor@sigaev.ru WWW: http://www.sigaev.ru/
В списке pgsql-hackers по дате отправления: