Обсуждение: Invalid free/delete

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

Invalid free/delete

От
Joshua Moore-Oliva
Дата:
While debugging with valgrind, I always receive the following error
message.



==30439== Invalid free() / delete / delete[]
==30439==    at 0x400448F9: free (vg_clientfuncs.c:180)
==30439==    by 0x421136CD: (within /lib/i686/libc-2.2.5.so)
==30439==    by 0x4207F852: (within /lib/i686/libc-2.2.5.so)
==30439==    by 0x400451FC: vgPlain___libc_freeres_wrapper
(vg_clientfuncs.c:585)
==30439==    by 0x4202BCC9: (within /lib/i686/libc-2.2.5.so)
==30439==    by 0x42017592: (within /lib/i686/libc-2.2.5.so)
==30439==    by 0x80491E1: (within
/home/chatgris/code/mastermailings/code/daemons/email_manager/email_manager.o)
==30439==    Address 0x402544D0 is not stack'd, malloc'd or free'd

I compiled a program with -L/usr/local/pgsql/lib -lpq

and then ran it with valgrind to check for memory leaks.

unfortunately, I don't know enough about pg to really understand what
could be casuing this, but problems like this can easily lead to
infrequent segfaults =).

Josh.

Re: Invalid free/delete

От
Neil Conway
Дата:
On Mon, 2002-11-25 at 11:22, Joshua Moore-Oliva wrote:
> While debugging with valgrind, I always receive the following error
> message.
>
> ==30439== Invalid free() / delete / delete[]
> ==30439==    at 0x400448F9: free (vg_clientfuncs.c:180)
> ==30439==    by 0x421136CD: (within /lib/i686/libc-2.2.5.so)
> ==30439==    by 0x4207F852: (within /lib/i686/libc-2.2.5.so)
> ==30439==    by 0x400451FC: vgPlain___libc_freeres_wrapper
> (vg_clientfuncs.c:585)
> ==30439==    by 0x4202BCC9: (within /lib/i686/libc-2.2.5.so)
> ==30439==    by 0x42017592: (within /lib/i686/libc-2.2.5.so)
> ==30439==    by 0x80491E1: (within
> /home/chatgris/code/mastermailings/code/daemons/email_manager/email_manager.o)
> ==30439==    Address 0x402544D0 is not stack'd, malloc'd or free'd

ISTM that indicates a problem in your application, not in libpq.

Cheers,

Neil

--
Neil Conway <neilc@samurai.com> || PGP Key ID: DB3C29FC