Обсуждение: Bug #800: Bad free in function PQclear

Поиск
Список
Период
Сортировка

Bug #800: Bad free in function PQclear

От
pgsql-bugs@postgresql.org
Дата:
Yvan Maillet (ymaillet@dialoca.com) reports a bug with a severity of 2
The lower the number the more severe it is.

Short Description
Bad free in function PQclear

Long Description
I use the libc library with the version 7.0.2-17.

I send a query with bad function.

The server answer me an error with text : ERROR:  Function 'octet_length(unknown)' does not exist
    Unable to identify a function that satisfies the given argument types
    You may need to add explicit typecasts.

Then,  i call PQclear to free result context, the core is dump with memory fault.

Sample Code


No file was uploaded with this report

Re: Bug #800: Bad free in function PQclear

От
Tom Lane
Дата:
pgsql-bugs@postgresql.org writes:
> I send a query with bad function.

> The server answer me an error with text : ERROR:  Function 'octet_length(unknown)' does not exist
>     Unable to identify a function that satisfies the given argument types
>     You may need to add explicit typecasts.

> Then,  i call PQclear to free result context, the core is dump with memory fault.

Are you sure this isn't your own bug --- like calling PQclear twice on
the same PGresult in your error-recovery code path?

            regards, tom lane