[Boost-bugs] [Boost C++ Libraries] #10167: Wide char tests fail with input stream error on QNX

Subject: [Boost-bugs] [Boost C++ Libraries] #10167: Wide char tests fail with input stream error on QNX
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2014-07-01 20:54:52


#10167: Wide char tests fail with input stream error on QNX
-----------------------------------------+---------------------------
 Reporter: Niklas Angare <li51ckf02@…> | Owner: ramey
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: serialization
  Version: Boost Development Trunk | Severity: Problem
 Keywords: |
-----------------------------------------+---------------------------
 All of the warchive tests have been failing with "input stream error" on
 QNX 6.5.0 (x86) since forever (http://lists.boost.org/boost-
 testing/2010/10/6697.php).

 I finally got around to debugging the issue. test_complex_text_warchive
 successsfully loads the file signature ("22 serialization::archive"), then
 the stream indicates failure when the library attempts to read
 library_version_type from the stream.

 Text of archive:
 {{{
 22 serialization::archive 11 5.77390790e-01 2.92427921e+00
 3.10149615851192895e+00 5.51821574551270633e+00
 }}}

 Hex dump of archive:
 {{{
 0000000 32 00 00 00 32 00 00 00 20 00 00 00 73 00 00 00 2...2.......s...
 0000010 65 00 00 00 72 00 00 00 69 00 00 00 61 00 00 00 e...r...i...a...
 0000020 6c 00 00 00 69 00 00 00 7a 00 00 00 61 00 00 00 l...i...z...a...
 0000030 74 00 00 00 69 00 00 00 6f 00 00 00 6e 00 00 00 t...i...o...n...
 0000040 3a 00 00 00 3a 00 00 00 61 00 00 00 72 00 00 00 :...:...a...r...
 0000050 63 00 00 00 68 00 00 00 69 00 00 00 76 00 00 00 c...h...i...v...
 0000060 65 00 00 00 20 00 00 00 31 00 00 00 31 00 00 00 e.......1...1...
 0000070 20 00 00 00 35 00 00 00 2e 00 00 00 37 00 00 00 ....5.......7...
 0000080 37 00 00 00 33 00 00 00 39 00 00 00 30 00 00 00 7...3...9...0...
 0000090 37 00 00 00 39 00 00 00 30 00 00 00 65 00 00 00 7...9...0...e...
 00000A0 2d 00 00 00 30 00 00 00 31 00 00 00 20 00 00 00 -...0...1.......
 00000B0 32 00 00 00 2e 00 00 00 39 00 00 00 32 00 00 00 2.......9...2...
 00000C0 34 00 00 00 32 00 00 00 37 00 00 00 39 00 00 00 4...2...7...9...
 00000D0 32 00 00 00 31 00 00 00 65 00 00 00 2b 00 00 00 2...1...e...+...
 00000E0 30 00 00 00 30 00 00 00 20 00 00 00 33 00 00 00 0...0.......3...
 00000F0 2e 00 00 00 31 00 00 00 30 00 00 00 31 00 00 00 ....1...0...1...
 0000100 34 00 00 00 39 00 00 00 36 00 00 00 31 00 00 00 4...9...6...1...
 0000110 35 00 00 00 38 00 00 00 35 00 00 00 31 00 00 00 5...8...5...1...
 0000120 31 00 00 00 39 00 00 00 32 00 00 00 38 00 00 00 1...9...2...8...
 0000130 39 00 00 00 35 00 00 00 65 00 00 00 2b 00 00 00 9...5...e...+...
 0000140 30 00 00 00 30 00 00 00 20 00 00 00 35 00 00 00 0...0.......5...
 0000150 2e 00 00 00 35 00 00 00 31 00 00 00 38 00 00 00 ....5...1...8...
 0000160 32 00 00 00 31 00 00 00 35 00 00 00 37 00 00 00 2...1...5...7...
 0000170 34 00 00 00 35 00 00 00 35 00 00 00 31 00 00 00 4...5...5...1...
 0000180 32 00 00 00 37 00 00 00 30 00 00 00 36 00 00 00 2...7...0...6...
 0000190 33 00 00 00 33 00 00 00 65 00 00 00 2b 00 00 00 3...3...e...+...
 00001A0 30 00 00 00 30 00 00 00 0a 00 00 00 0...0.......
 00001AC
 }}}

 Stack trace from the failure point (!#2):
 {{{
 #0 __cxa_throw (obj=0x809de30, tinfo=0x8074888, dest=0x80713ba
 <boost::archive::archive_exception::~archive_exception()>) at
 ../../../../../libstdc++-v3/libsupc++/unwind-cxx.h:234
 #1 0x0805bb05 in
 boost::serialization::throw_exception<boost::archive::archive_exception>
 (e=@0x8047238) at ../../../boost/serialization/throw_exception.hpp:36
 #2 0x0806756e in
 boost::archive::basic_text_iprimitive<std::basic_istream<wchar_t,
 std::char_traits<wchar_t> > >::load<boost::archive::library_version_type>
 (this=0x8047704, t=@0x8047406)
     at ../../../boost/archive/basic_text_iprimitive.hpp:86
 #3 0x080674f3 in
 boost::archive::text_wiarchive_impl<boost::archive::text_wiarchive>::load<boost::archive::library_version_type>
 (this=0x80476f0, t=@0x8047406) at
 ../../../boost/archive/text_wiarchive.hpp:67
 #4 0x080674bb in
 boost::archive::load_access::load_primitive<boost::archive::text_wiarchive,
 boost::archive::library_version_type> (ar=@0x80476f0, t=@0x8047406) at
 ../../../boost/archive/detail/iserializer.hpp:103
 #5 0x0806747d in
 boost::archive::detail::load_non_pointer_type<boost::archive::text_wiarchive>::load_primitive::invoke<boost::archive::library_version_type>
 (ar=@0x80476f0, t=@0x8047406)
     at ../../../boost/archive/detail/iserializer.hpp:385
 #6 0x08067417 in
 boost::archive::detail::load_non_pointer_type<boost::archive::text_wiarchive>::invoke<boost::archive::library_version_type>
 (ar=@0x80476f0, t=@0x8047406)
     at ../../../boost/archive/detail/iserializer.hpp:462
 #7 0x0806732a in boost::archive::load<boost::archive::text_wiarchive,
 boost::archive::library_version_type> (ar=@0x80476f0, t=@0x8047406) at
 ../../../boost/archive/detail/iserializer.hpp:618
 #8 0x0806722a in
 boost::archive::detail::common_iarchive<boost::archive::text_wiarchive>::load_override<boost::archive::library_version_type>
 (this=0x80476f0, t=@0x8047406)
     at ../../../boost/archive/detail/common_iarchive.hpp:66
 #9 0x08067134 in
 boost::archive::basic_text_iarchive<boost::archive::text_wiarchive>::load_override<boost::archive::library_version_type>
 (this=0x80476f0, t=@0x8047406)
     at ../../../boost/archive/basic_text_iarchive.hpp:71
 #10 0x08067034 in
 boost::archive::text_wiarchive_impl<boost::archive::text_wiarchive>::load_override<boost::archive::library_version_type>
 (this=0x80476f0, t=@0x8047406) at
 ../../../boost/archive/text_wiarchive.hpp:95
 #11 0x08066dbe in
 boost::archive::detail::interface_iarchive<boost::archive::text_wiarchive>::operator>><boost::archive::library_version_type>
 (this=0x80476f0, t=@0x8047406)
     at ../../../boost/archive/detail/interface_iarchive.hpp:60
 #12 0x08066945 in
 boost::archive::basic_text_iarchive<boost::archive::text_wiarchive>::init
 (this=0x80476f0) at ../../../boost/archive/impl/basic_text_iarchive.ipp:60
 #13 0x080665e7 in
 boost::archive::text_wiarchive_impl<boost::archive::text_wiarchive>::text_wiarchive_impl
 (this=0x80476f0, is=@0x80475e0, flags=0) at
 ../../../boost/archive/impl/text_wiarchive_impl.ipp:112
 #14 0x0804f341 in boost::archive::text_wiarchive::text_wiarchive
 (this=0x80476f0, is=@0x80475e0, flags=0) at
 ../../../boost/archive/text_wiarchive.hpp:123
 #15 0x0804d3a5 in test_main () at test_complex.cpp:64
 #16 0x0804d03d in main (argc=1, argv=0x8047840) at test_tools.hpp:203
 }}}

 This was done with code from the develop branch earlier today:[[br]]
 Boost commit 31c60438c5a27ae6d956d01db76e7d84a01b8b2b[[br]]
 Serialization commit d9121537826a4e4e9a378c43818bd9b7d5f3a9bd

 I noticed that the code that reads the signature string manually skips the
 space between the length and the actual string. If I remove the space
 after the signature from the file, it successfully loads
 library_version_type but then fails when trying to read the first float.
 So it appears as if the problem has something to do with the spaces
 between values.

 Suggestions?

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/10167>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:16 UTC