From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | prlw1(at)cam(dot)ac(dot)uk |
Cc: | pgsql-hackers(at)postgreSQL(dot)org |
Subject: | Re: [HACKERS] Memory problem? |
Date: | 1999-06-15 13:55:35 |
Message-ID: | 22580.929454935@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
"Patrick Welche" <prlw1(at)newn(dot)cam(dot)ac(dot)uk> writes:
> I am having trouble with PQclear causing a segmentation fault, and I don't
> really know where to look.
Not at PQclear(); almost surely, the bug lies elsewhere. The most
likely bets are (a) that PQclear is being called twice for the same
PGresult (although this looks unlikely with the current libpq++,
since it doesn't give the calling app direct access to the PGresult),
or (b) that some random other bit of code is clobbering memory that
doesn't belong to it. When you make a mistake like writing a little
bit past the end of a malloc'd piece of memory, the usual symptom is
coredumps in later malloc or free operations, because what you've
clobbered is malloc's memory management data structures.
Unfortunately that means the bug might be almost anywhere else in
your app :-(. Good luck...
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Peter Mount | 1999-06-15 13:57:54 | RE: [HACKERS] off-topic: pgaccess? |
Previous Message | Kaare Rasmussen | 1999-06-15 13:19:50 | Re: [HACKERS] Less then 12hrs since release ... |