Re: async problems? - Mailing list pgsql-general

From Tom Lane
Subject Re: async problems?
Date
Msg-id 17767.1086132932@sss.pgh.pa.us
Whole thread Raw
In response to async problems?  (Mark Harrison <mh@pixar.com>)
Responses Re: async problems?
List pgsql-general
Mark Harrison <mh@pixar.com> writes:
>      res = PQexec(conn,"DECLARE cur CURSOR FOR select * from assets limit 8888");    printf("PQexec declare %s\n",
PQresStatus(PQresultStatus(res)));
>      PQclear(res);

>      rc = PQsendQuery(conn, fetchstr);
>      printf("PQsendQuery %d\n", rc);
>      PQclear(res);

You just re-cleared an already cleared result.  This probably caused a
double free, corrupting malloc's datastructures.  The later crash within
malloc is not surprising...

            regards, tom lane

pgsql-general by date:

Previous
From: Mark Harrison
Date:
Subject: async problems?
Next
From: Hadley Willan
Date:
Subject: Dynamic SQL