Marco Craveiro
2012-08-15 21:10:43 UTC
Hi PQXX,
I've got all my code compiling with GCC 4.7 in C++-11, using a snapshot
from the 20th of May (obtained here http://pqxx.org/~jtv/tmp/pqxx/snapshot/).
I'm very happy with this as all my code runs perfectly. When I try to use
clang 3.1 with the same settings - e.g. using GCC's libstdc++ and exactly
the same configuration as GCC - all the code compiles just fine but I get a
lot of strange run-time errors due to segfaults. Valgrind reveals a lot of
errors like these:
==28530== Invalid read of size 4
==28530== at 0x80D912: __gnu_cxx::__exchange_and_add(int volatile*,
int) (atomicity.h:48)
==28530== by 0x80D866: __gnu_cxx::__exchange_and_add_dispatch(int*,
int) (atomicity.h:81)
==28530== by 0x818E69:
std::tr1::_Sp_counted_base<(__gnu_cxx::_Lock_policy)1>::_M_release()
(shared_ptr.h:145)
==28530== by 0x818DA1:
std::tr1::__shared_count<(__gnu_cxx::_Lock_policy)1>::~__shared_count()
(shared_ptr.h:348)
==28530== by 0x818D04:
std::tr1::__shared_count<(__gnu_cxx::_Lock_policy)1>::~__shared_count()
(shared_ptr.h:346)
==28530== by 0x818CCB:
std::tr1::__shared_ptr<pqxx::internal::result_data const,
(__gnu_cxx::_Lock_policy)1>::~__shared_ptr() (shared_ptr.h:548)
==28530== by 0x818C84:
std::tr1::shared_ptr<pqxx::internal::result_data const>::~shared_ptr()
(shared_ptr.h:992)
==28530== by 0x818C44:
std::tr1::shared_ptr<pqxx::internal::result_data const>::~shared_ptr()
(shared_ptr.h:992)
==28530== by 0x818C04:
pqxx::internal::PQAlloc<pqxx::internal::result_data const,
&(pqxx::internal::freemem_result_data(pqxx::internal::result_data
const*))>::~PQAlloc() (util.hxx:494)
==28530== by 0x818BC4: pqxx::result::~result() (result.hxx:81)
==28530==
Does this ring any bells? I've scanned the archives and bug tracker but
didn't spot anything obvious. If not I'll try to get a minimal reproduction.
Cheers
Marco
I've got all my code compiling with GCC 4.7 in C++-11, using a snapshot
from the 20th of May (obtained here http://pqxx.org/~jtv/tmp/pqxx/snapshot/).
I'm very happy with this as all my code runs perfectly. When I try to use
clang 3.1 with the same settings - e.g. using GCC's libstdc++ and exactly
the same configuration as GCC - all the code compiles just fine but I get a
lot of strange run-time errors due to segfaults. Valgrind reveals a lot of
errors like these:
==28530== Invalid read of size 4
==28530== at 0x80D912: __gnu_cxx::__exchange_and_add(int volatile*,
int) (atomicity.h:48)
==28530== by 0x80D866: __gnu_cxx::__exchange_and_add_dispatch(int*,
int) (atomicity.h:81)
==28530== by 0x818E69:
std::tr1::_Sp_counted_base<(__gnu_cxx::_Lock_policy)1>::_M_release()
(shared_ptr.h:145)
==28530== by 0x818DA1:
std::tr1::__shared_count<(__gnu_cxx::_Lock_policy)1>::~__shared_count()
(shared_ptr.h:348)
==28530== by 0x818D04:
std::tr1::__shared_count<(__gnu_cxx::_Lock_policy)1>::~__shared_count()
(shared_ptr.h:346)
==28530== by 0x818CCB:
std::tr1::__shared_ptr<pqxx::internal::result_data const,
(__gnu_cxx::_Lock_policy)1>::~__shared_ptr() (shared_ptr.h:548)
==28530== by 0x818C84:
std::tr1::shared_ptr<pqxx::internal::result_data const>::~shared_ptr()
(shared_ptr.h:992)
==28530== by 0x818C44:
std::tr1::shared_ptr<pqxx::internal::result_data const>::~shared_ptr()
(shared_ptr.h:992)
==28530== by 0x818C04:
pqxx::internal::PQAlloc<pqxx::internal::result_data const,
&(pqxx::internal::freemem_result_data(pqxx::internal::result_data
const*))>::~PQAlloc() (util.hxx:494)
==28530== by 0x818BC4: pqxx::result::~result() (result.hxx:81)
==28530==
Does this ring any bells? I've scanned the archives and bug tracker but
didn't spot anything obvious. If not I'll try to get a minimal reproduction.
Cheers
Marco
--
So young, and already so unknown -- Pauli
blog: http://mcraveiro.blogspot.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.pgfoundry.org/pipermail/libpqxx-general/attachments/20120815/4b1ecd7b/attachment.html>
So young, and already so unknown -- Pauli
blog: http://mcraveiro.blogspot.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.pgfoundry.org/pipermail/libpqxx-general/attachments/20120815/4b1ecd7b/attachment.html>