Opened 11 years ago

Closed 11 years ago

#6038 closed Bugs (invalid)

nonfinite_num_facet_serialization: free(): invalid next size (fast): 0x0000000000428e50 ***

Reported by: cryptooctoploid@… Owned by: John Maddock
Milestone: To Be Determined Component: math
Version: Boost Development Trunk Severity: Problem
Keywords: Cc:

Description

While testing I came across this error:
*** glibc detected *** /var/tmp/check/results/boost/bin.v2/libs/math/example/nonfinite_num_facet_serialization.test/gcc-4.7.0/debug/nonfinite_num_facet_serialization: free(): invalid next size (fast): 0x0000000000428e50 ***

Full backtrace:
markus@x4 debug % gdb nonfinite_num_facet_serialization
GNU gdb (Gentoo 7.3.1 p1) 7.3.1
Copyright (C) 2011 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-pc-linux-gnu".
For bug reporting instructions, please see:
<http://bugs.gentoo.org/>...
Reading symbols from /var/tmp/check/results/boost/bin.v2/libs/math/example/nonfinite_num_facet_serialization.test/gcc-4.7.0/debug/nonfinite_num_facet_serialization...done.
(gdb) run
Starting program: /var/tmp/check/results/boost/bin.v2/libs/math/example/nonfinite_num_facet_serialization.test/gcc-4.7.0/debug/nonfinite_num_facet_serialization
warning: no loadable sections found in added symbol-file system-supplied DSO at 0x7ffff7ffa000
warning: Could not load shared library symbols for linux-vdso.so.1.
Do you need "set solib-search-path" or "set sysroot"?

Nonfinite_serialization.cpp' example program.
BOOST_NO_NUMERIC_LIMITS_LOWEST is defined, so no max_digits10 available either,using our own version instead.
std::numeric_limits<float>::max_digits10 is 9
std::numeric_limits<double>::max_digits10 is 17
Construct some foo structures with a finite and nonfinites.
f0 :
|-- fvalue = 3.141593
`-- dvalue = 3.14159265358979
f1 :
|-- fvalue = -inf
`-- dvalue = -inf
f2 :
|-- fvalue = inf
`-- dvalue = inf
f3 :
|-- fvalue = nan
`-- dvalue = nan
 Write to a string buffer.
Output is: `(3.14159274,3.1415926535897931)(-inf,-inf)(inf,inf)(nan,nan)'
Done output to ostringstream.
Read foo structures from a string buffer.
Input is: `(3.1415927,3.1415926535897931)(-inf,-inf)(inf,inf)(nan,nan)'
Read OK.
f0 :
|-- fvalue = 3.141593
`-- dvalue = 3.14159265358979
f1 :
|-- fvalue = -inf
`-- dvalue = -inf
f2 :
|-- fvalue = inf
`-- dvalue = inf
f3 :
|-- fvalue = nan
`-- dvalue = nan
Done input from istringstream.
Serialize (using Boost text archive).
f0 :
|-- fvalue = 3.141593
`-- dvalue = 3.14159265358979
f1 :
|-- fvalue = -inf
`-- dvalue = -inf
f2 :
|-- fvalue = inf  
`-- dvalue = inf  
f3 :
|-- fvalue = nan  
`-- dvalue = nan  
Done.
Deserialize (Boost text archive)...
f0 :
|-- fvalue = 3.141593
`-- dvalue = 3.14159265358979
f1 :
|-- fvalue = -inf 
`-- dvalue = -inf 
f2 :
|-- fvalue = inf  
`-- dvalue = inf  
f3 :
|-- fvalue = nan  
`-- dvalue = nan  
Done.
*** glibc detected *** /var/tmp/check/results/boost/bin.v2/libs/math/example/nonfinite_num_facet_serialization.test/gcc-4.7.0/debug/nonfinite_num_facet_serialization: free(): invalid next size (fast): 0x0000000000428e50 ***
======= Backtrace: =========
/lib64/libc.so.6(+0x79dfd)[0x7ffff775adfd]
/var/tmp/check/results/boost/bin.v2/libs/serialization/build/gcc-4.7.0/debug/libboost_serialization.so.1.48.0(_ZN9__gnu_cxx13new_allocatorIN5boost7archive6detail19basic_iarchive_impl10cobject_idEE10deallocateEPS5_m+0x20)[0x7ffff7f78954]
/var/tmp/check/results/boost/bin.v2/libs/serialization/build/gcc-4.7.0/debug/libboost_serialization.so.1.48.0(_ZNSt12_Vector_baseIN5boost7archive6detail19basic_iarchive_impl10cobject_idESaIS4_EE13_M_deallocateEPS4_m+0x32)[0x7ffff7f7809a]
/var/tmp/check/results/boost/bin.v2/libs/serialization/build/gcc-4.7.0/debug/libboost_serialization.so.1.48.0(_ZNSt12_Vector_baseIN5boost7archive6detail19basic_iarchive_impl10cobject_idESaIS4_EED2Ev+0x56)[0x7ffff7f772fc]
/var/tmp/check/results/boost/bin.v2/libs/serialization/build/gcc-4.7.0/debug/libboost_serialization.so.1.48.0(_ZNSt6vectorIN5boost7archive6detail19basic_iarchive_impl10cobject_idESaIS4_EED1Ev+0x42)[0x7ffff7f768f6]
/var/tmp/check/results/boost/bin.v2/libs/serialization/build/gcc-4.7.0/debug/libboost_serialization.so.1.48.0(_ZN5boost7archive6detail19basic_iarchive_implD2Ev+0x1d)[0x7ffff7f7589b]
/var/tmp/check/results/boost/bin.v2/libs/serialization/build/gcc-4.7.0/debug/libboost_serialization.so.1.48.0(_ZN5boost7archive6detail14basic_iarchiveD2Ev+0x34)[0x7ffff7f74f34]
/var/tmp/check/results/boost/bin.v2/libs/math/example/nonfinite_num_facet_serialization.test/gcc-4.7.0/debug/nonfinite_num_facet_serialization(_ZN5boost7archive6detail15common_iarchiveINS0_13text_iarchiveEED2Ev+0x2a)[0x41157a]
/var/tmp/check/results/boost/bin.v2/libs/math/example/nonfinite_num_facet_serialization.test/gcc-4.7.0/debug/nonfinite_num_facet_serialization(_ZN5boost7archive19basic_text_iarchiveINS0_13text_iarchiveEED2Ev+0x2a)[0x4115e4]
/var/tmp/check/results/boost/bin.v2/libs/math/example/nonfinite_num_facet_serialization.test/gcc-4.7.0/debug/nonfinite_num_facet_serialization(_ZN5boost7archive18text_iarchive_implINS0_13text_iarchiveEED2Ev+0x2b)[0x410f4b]
/var/tmp/check/results/boost/bin.v2/libs/math/example/nonfinite_num_facet_serialization.test/gcc-4.7.0/debug/nonfinite_num_facet_serialization[0x4108e1]
/var/tmp/check/results/boost/bin.v2/libs/math/example/nonfinite_num_facet_serialization.test/gcc-4.7.0/debug/nonfinite_num_facet_serialization[0x40f291]
/lib64/libc.so.6(__libc_start_main+0xf5)[0x7ffff77023b5]
/var/tmp/check/results/boost/bin.v2/libs/math/example/nonfinite_num_facet_serialization.test/gcc-4.7.0/debug/nonfinite_num_facet_serialization[0x40dda9]
======= Memory map: ========
00400000-00424000 r-xp 00000000 08:00 1465812                            /var/tmp/check/results/boost/bin.v2/libs/math/example/nonfinite_num_facet_serialization.test/gcc-4.7.0/debug/nonfinite_num_facet_serialization
00424000-00426000 rw-p 00024000 08:00 1465812                            /var/tmp/check/results/boost/bin.v2/libs/math/example/nonfinite_num_facet_serialization.test/gcc-4.7.0/debug/nonfinite_num_facet_serialization
00426000-00447000 rw-p 00000000 00:00 0                                  [heap]
7ffff76e1000-7ffff7845000 r-xp 00000000 08:12 2759016                    /lib/libc-2.14.90.so
7ffff7845000-7ffff7a44000 ---p 00164000 08:12 2759016                    /lib/libc-2.14.90.so
7ffff7a44000-7ffff7a48000 r--p 00163000 08:12 2759016                    /lib/libc-2.14.90.so
7ffff7a48000-7ffff7a4a000 rw-p 00167000 08:12 2759016                    /lib/libc-2.14.90.so
7ffff7a4a000-7ffff7a4e000 rw-p 00000000 00:00 0
7ffff7a4e000-7ffff7ad0000 r-xp 00000000 08:12 4169753                    /lib/libm-2.14.90.so
7ffff7ad0000-7ffff7ccf000 ---p 00082000 08:12 4169753                    /lib/libm-2.14.90.so
7ffff7ccf000-7ffff7cd0000 r--p 00081000 08:12 4169753                    /lib/libm-2.14.90.so
7ffff7cd0000-7ffff7cd1000 rw-p 00082000 08:12 4169753                    /lib/libm-2.14.90.so
7ffff7cd1000-7ffff7dbd000 r-xp 00000000 08:12 46620722                   /usr/lib/libstdc++.so.6.0.16
7ffff7dbd000-7ffff7dc5000 r--p 000eb000 08:12 46620722                   /usr/lib/libstdc++.so.6.0.16
7ffff7dc5000-7ffff7dc8000 rw-p 000f3000 08:12 46620722                   /usr/lib/libstdc++.so.6.0.16
7ffff7dc8000-7ffff7ddd000 rw-p 00000000 00:00 0
7ffff7ddd000-7ffff7dfd000 r-xp 00000000 08:12 2759012                    /lib/ld-2.14.90.so
7ffff7e10000-7ffff7e17000 rw-p 00000000 00:00 0
7ffff7e17000-7ffff7e2c000 r-xp 00000000 08:12 510000                     /lib/libgcc_s.so.1
7ffff7e2c000-7ffff7e2d000 rw-p 00015000 08:12 510000                     /lib/libgcc_s.so.1
7ffff7e2d000-7ffff7e2e000 rw-p 00000000 00:00 0
7ffff7e4f000-7ffff7e51000 rw-p 00000000 00:00 0
7ffff7e51000-7ffff7fed000 r-xp 00000000 08:00 1454722                    /var/tmp/check/results/boost/bin.v2/libs/serialization/build/gcc-4.7.0/debug/libboost_serialization.so.1.48.0
7ffff7fed000-7ffff7ff9000 rw-p 0019b000 08:00 1454722                    /var/tmp/check/results/boost/bin.v2/libs/serialization/build/gcc-4.7.0/debug/libboost_serialization.so.1.48.0
7ffff7ff9000-7ffff7ffa000 rw-p 00000000 00:00 0
7ffff7ffa000-7ffff7ffc000 r-xp 00000000 00:00 0                          [vdso]
7ffff7ffc000-7ffff7ffd000 r--p 0001f000 08:12 2759012                    /lib/ld-2.14.90.so
7ffff7ffd000-7ffff7ffe000 rw-p 00020000 08:12 2759012                    /lib/ld-2.14.90.so
7ffff7ffe000-7ffff7fff000 rw-p 00000000 00:00 0
7ffffffde000-7ffffffff000 rw-p 00000000 00:00 0                          [stack]
ffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0                  [vsyscall]

Program received signal SIGABRT, Aborted.
0x00007ffff7715e95 in raise () from /lib64/libc.so.6
(gdb) bt
#0  0x00007ffff7715e95 in raise () from /lib64/libc.so.6
#1  0x00007ffff7717307 in abort () from /lib64/libc.so.6
#2  0x00007ffff77550f3 in __libc_message () from /lib64/libc.so.6
#3  0x00007ffff775adfd in malloc_printerr () from /lib64/libc.so.6
#4  0x00007ffff7f78954 in __gnu_cxx::new_allocator<boost::archive::detail::basic_iarchive_impl::cobject_id>::deallocate (this=0x4268a0,
    __p=0x428e50) from /var/tmp/check/results/boost/bin.v2/libs/serialization/build/gcc-4.7.0/debug/libboost_serialization.so.1.48.0
#5  0x00007ffff7f7809a in std::_Vector_base<boost::archive::detail::basic_iarchive_impl::cobject_id, std::allocator<boost::archive::detail::basic_iarchive_impl::cobject_id> >::_M_deallocate (this=0x4268a0, __p=0x428e50, __n=1)
    at /usr/lib/gcc/x86_64-pc-linux-gnu/4.7.0/include/g++-v4/bits/stl_vector.h:173
#6  0x00007ffff7f772fc in std::_Vector_base<boost::archive::detail::basic_iarchive_impl::cobject_id, std::allocator<boost::archive::detail::basic_iarchive_impl::cobject_id> >::~_Vector_base (this=0x4268a0, __in_chrg=<optimized out>)
   from /var/tmp/check/results/boost/bin.v2/libs/serialization/build/gcc-4.7.0/debug/libboost_serialization.so.1.48.0
#7  0x00007ffff7f768f6 in std::vector<boost::archive::detail::basic_iarchive_impl::cobject_id, std::allocator<boost::archive::detail::basic_iarchive_impl::cobject_id> >::~vector (this=0x4268a0, __in_chrg=<optimized out>)
   from /var/tmp/check/results/boost/bin.v2/libs/serialization/build/gcc-4.7.0/debug/libboost_serialization.so.1.48.0
#8  0x00007ffff7f7589b in boost::archive::detail::basic_iarchive_impl::~basic_iarchive_impl (this=0x426840, __in_chrg=<optimized out>)
    at ../libs/serialization/src/basic_iarchive.cpp:176
#9  0x00007ffff7f74f34 in boost::archive::detail::basic_iarchive::~basic_iarchive (this=0x7fffffffd700, __in_chrg=<optimized out>)
    at ../libs/serialization/src/basic_iarchive.cpp:516
#10 0x000000000041157a in boost::archive::detail::common_iarchive<boost::archive::text_iarchive>::~common_iarchive (this=0x7fffffffd700,
    __in_chrg=<optimized out>)
#11 0x00000000004115e4 in boost::archive::basic_text_iarchive<boost::archive::text_iarchive>::~basic_text_iarchive (this=0x7fffffffd700,
    __in_chrg=<optimized out>)
#12 0x0000000000410f4b in boost::archive::text_iarchive_impl<boost::archive::text_iarchive>::~text_iarchive_impl (this=0x7fffffffd700,
    __in_chrg=<optimized out>)
#13 0x00000000004108e1 in boost::archive::text_iarchive::~text_iarchive (this=0x7fffffffd700, __in_chrg=<optimized out>)
    at ../boost/archive/text_iarchive.hpp:143
#14 0x000000000040f291 in main () at ../libs/math/example/nonfinite_num_facet_serialization.cpp:266
(gdb) q

Change History (1)

comment:1 by cryptooctoploid@…, 11 years ago

Resolution: invalid
Status: newclosed

Ah, I had an older libstdc++.so.6 in the path. Sorry for noise.

Note: See TracTickets for help on using tickets.