[Boost-bugs] [Boost C++ Libraries] #11475: qi real parser- valgrind error

Subject: [Boost-bugs] [Boost C++ Libraries] #11475: qi real parser- valgrind error
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2015-07-14 12:56:15


#11475: qi real parser- valgrind error
------------------------------+---------------------
 Reporter: oswin.krause@… | Owner: djowel
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: spirit
  Version: Boost 1.59.0 | Severity: Problem
 Keywords: valgrind |
------------------------------+---------------------
 I tested boost 1.59 rc1 today and got a regression in my software. my csv
 parser reported 4 wrong values (of approximately 200)

 i reduced the problem somewhat to

 {{{
 #include <boost/spirit/include/qi.hpp>
 #include <vector>
 #include <string>
 #include <iostream>
 using namespace boost::spirit::qi;
 int main(){
         std::cout<<BOOST_LIB_VERSION<<std::endl;
         std::string str="1.0,119,80,35,0,29.0,0.263,29,1";
         std::vector<double> fileContents;
         phrase_parse(
                 str.begin(),str.end(),
                         double_ % ',',
                 space , fileContents
         );

         for(std::size_t j = 0; j != 9; ++j)
                 std::cout<<fileContents[j]<<" "<<std::flush;

 }

 }}}

 problems vanish in debug mode, g++ finds a warning and valgrind finds a
 conditioned jump based on unitialised memory. see attached the outputs for
 comparison

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/11475>
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:18 UTC