Re: [INTERFACES] Odd program behaviour

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: [INTERFACES] Odd program behaviour
Дата
Msg-id 3912.920878176@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Odd program behaviour  (James Thompson <jamest@math.ksu.edu>)
Список pgsql-interfaces
James Thompson <jamest@math.ksu.edu> writes:
> I'm desperate here.  I've got two days invested in this and have not made
> any progress at all.  I'm hoping someone has run into the following and
> might be able to give me a clue.
> Everything works fine when saving data but pulling data from the database
> results in a segfault when using the TCL/TK front end.
> [ segfault is evidently inside malloc ]

A fairly reliable rule is that a segfault inside malloc means your
program has trodden on malloc's data structures that keep track of free
and allocated space in the malloc arena.  Usually this means you have
written off the end of a chunk of malloc'd space.  (Whether this is a
bug in the code that calculated the amount of space to ask for or a bug
in the code using the space is for you to say, of course.)

If you don't have any direct insights into the problem, I'd suggest
building your app with a debugging malloc package that will detect
the corruption as soon as possible.  One I've had good luck with
for apps that don't require huge amounts of space is Electric Fence.
(No URL at hand, but poke around the web and you should find it.)

            regards, tom lane

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

Предыдущее
От: "Ken J. Wright"
Дата:
Сообщение: Re: [INTERFACES] copy command & null datetime
Следующее
От: Tom Lane
Дата:
Сообщение: Re: [INTERFACES] copy command & null datetime