From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | James Thompson <jamest(at)math(dot)ksu(dot)edu> |
Cc: | PgSQL Interfaces <pgsql-interfaces(at)postgreSQL(dot)org> |
Subject: | Re: [INTERFACES] Odd program behaviour |
Date: | 1999-03-08 07:29:36 |
Message-ID: | 3912.920878176@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-interfaces |
James Thompson <jamest(at)math(dot)ksu(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 1999-03-08 07:40:52 | Re: [INTERFACES] copy command & null datetime |
Previous Message | Ulf Mehlig | 1999-03-08 07:07:08 | pgaccess: window size and column resizing |