From: | "Patrick Welche" <prlw1(at)newn(dot)cam(dot)ac(dot)uk> |
---|---|
To: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Memory problem? |
Date: | 1999-06-15 11:55:20 |
Message-ID: | E10troG-00023U-00@quartz.newn.cam.ac.uk |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
I am having trouble with PQclear causing a segmentation fault, and I don't
really know where to look. I have 3 identical tables (only 2 come into play)
all of the form
+----------------------------------+----------------------------------+-------+
| Field | Type | Length|
+----------------------------------+----------------------------------+-------+
| leaf1 | int4 not null | 4 |
| leaf2 | int4 not null | 4 |
+----------------------------------+----------------------------------+-------+
and the last thing that happens before trouble is:
SELECT leaf2 FROM pers_room WHERE leaf1=1
SELECT leaf1 FROM pers_room WHERE leaf2=1
SELECT leaf2 FROM pers_comp WHERE leaf1=1
Segmentation fault (core dumped)
#0 0x40112370 in free ()
#1 0x400b5060 in _GLOBAL_OFFSET_TABLE_ () at pqsignal.c:42
#2 0x400ad3be in PQclear (res=0x76280) at fe-exec.c:325
#3 0x400a6181 in PgConnection::Exec (this=0xefbfd44c,
query=0x76280 "SELECT leaf2 FROM pers_comp WHERE leaf1=1")
at pgconnection.cc:98
323 /* Free the top-level tuple pointer array */
324 if (res->tuples)
325 free(res->tuples);
and I suspect from the manpage:
Otherwise, if the argument does not match a pointer
earlier returned by the calloc() malloc() or realloc() function, or if
the space has been deallocated by a call to free() or realloc(), general
havoc may occur.
As you see from the backtrace, I am using libpq++. Anyone have a suggestion
where to look?
Cheers,
Patrick
From | Date | Subject | |
---|---|---|---|
Next Message | The Hermit Hacker | 1999-06-15 11:59:09 | Re: PostgreSQL 6.5 Relase Typo |
Previous Message | David R. Favor | 1999-06-15 11:05:53 | AIX 432 regression test expected results changes |