Re: segfault which isn't supposed to happen (including example code)

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: segfault which isn't supposed to happen (including example code)
Дата
Msg-id 4725.1026228989@sss.pgh.pa.us
обсуждение исходный текст
Ответ на segfault which isn't supposed to happen (including example code)  (eric <plukje@gmx.net>)
Список pgsql-bugs
eric <plukje@gmx.net> writes:
> this segfault is all about PQclear();

If you pass an uninitialized pointer to a library routine, it's likely
to segfault.  This is *your* bug, not the library's, because the library
routine has no way to know that you gave it a random pointer value
instead of something that actually points to valid data.

You might want to adjust your compiler switches so that the compiler
warns about uses of uninitialized variables.  In gcc, "-O -Wall" is
a pretty good combination.

            regards, tom lane

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Insert aborted, but Sequence increased
Следующее
От: Stephan Szabo
Дата:
Сообщение: Re: Insert aborted, but Sequence increased