[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#622727: marked as done (libpqxx3-dev: Memleak in pqxx)

Your message dated Wed, 4 May 2011 16:07:32 +0200
with message-id <FE6F969D-4372-43BA-96A0-73B8A454F281@cacholong.nl>
and subject line Re: libpqxx3-dev: Memleak in pqxx
has caused the Debian Bug report #622727,
regarding libpqxx3-dev: Memleak in pqxx
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@bugs.debian.org

622727: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=622727
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
Package: libpqxx3-dev
Version: 3.0.2-1
Severity: normal

The following piece of code gives me a memleak (valgrind report)

#include <pqxx/pqxx>

int main(int argc, char **argv) {

        pqxx::connection t("host= username=changeme password=changeme dbname=changeme connect_timeout=10");
		pqxx::work work(t, "transaction");

Compile with:
g++ -o main main.cpp -lpqxx

Valgrind output:
==6329== Memcheck, a memory error detector
==6329== Copyright (C) 2002-2010, and GNU GPL'd, by Julian Seward et al.
==6329== Using Valgrind-3.6.0.SVN-Debian and LibVEX; rerun with -h for copyright info
==6329== Command: ./main
==6329== HEAP SUMMARY:
==6329==     in use at exit: 121,024 bytes in 2,643 blocks
==6329==   total heap usage: 4,033 allocs, 1,390 frees, 924,195 bytes allocated
==6329== 300 (60 direct, 240 indirect) bytes in 1 blocks are definitely lost in loss record 228 of 277
==6329==    at 0x4C244E8: malloc (vg_replace_malloc.c:236)
==6329==    by 0x58FF3FC: nss_parse_service_list (nsswitch.c:622)
==6329==    by 0x58FFBED: __nss_database_lookup (nsswitch.c:164)
==6329==    by 0x8D0434F: ???
==6329==    by 0x8D04FA4: ???
==6329==    by 0x58BFADC: getpwuid_r@@GLIBC_2.2.5 (getXXbyYY_r.c:253)
==6329==    by 0x5DBD648: ??? (in /usr/lib/libpq.so.5.3)
==6329==    by 0x5DA9D47: ??? (in /usr/lib/libpq.so.5.3)
==6329==    by 0x5DB8DEE: ??? (in /usr/lib/libpq.so.5.3)
==6329==    by 0x5DBA391: ??? (in /usr/lib/libpq.so.5.3)
==6329==    by 0x5DAACB5: PQconnectPoll (in /usr/lib/libpq.so.5.3)
==6329==    by 0x5DABDAD: ??? (in /usr/lib/libpq.so.5.3)
==6329== LEAK SUMMARY:
==6329==    definitely lost: 60 bytes in 1 blocks
==6329==    indirectly lost: 240 bytes in 10 blocks
==6329==      possibly lost: 0 bytes in 0 blocks
==6329==    still reachable: 120,724 bytes in 2,632 blocks
==6329==         suppressed: 0 bytes in 0 blocks
==6329== Reachable blocks (those to which a pointer was found) are not shown.
==6329== To see them, rerun with: --leak-check=full --show-reachable=yes
==6329== For counts of detected and suppressed errors, rerun with: -v
==6329== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 8 from 6)

Additional information:
g++-4.5 (latest from debian installed)


Matthijs Möhlmann

-- System Information:
Debian Release: wheezy/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (500, 'testing'), (1, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.38-2-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages libpqxx3-dev depends on:
ii  libpq-dev                     9.0.3-1+b1 header files for libpq5 (PostgreSQ
ii  libpqxx-3.0                   3.0.2-1    C++ library to connect to PostgreS
ii  pkg-config                    0.25-1.1   manage compile and link flags for 

libpqxx3-dev recommends no packages.

Versions of packages libpqxx3-dev suggests:
pn  libpqxx3-doc                  <none>     (no description available)

-- no debconf information

--- End Message ---
--- Begin Message ---
See http://pqxx.org/development/libpqxx/ticket/212 for the answer.

Valgrind is reporting wrong here.


Matthijs Möhlmann

--- End Message ---

Reply to: