[Boost-bugs] [Boost C++ Libraries] #13459: boost/regex/v4/perl_matcher_non_recursive.hpp infinite loop bug

Subject: [Boost-bugs] [Boost C++ Libraries] #13459: boost/regex/v4/perl_matcher_non_recursive.hpp infinite loop bug
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2018-02-28 15:09:26


#13459: boost/regex/v4/perl_matcher_non_recursive.hpp infinite loop bug
---------------------------------+--------------------------
 Reporter: komad <tlagyqls7@…> | Owner: John Maddock
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: regex
  Version: Boost 1.66.0 | Severity: Problem
 Keywords: loop bug |
---------------------------------+--------------------------
 == description ==
 {{{ do
    {
       --position;
       --count;
       ++state_count;
    }while(count && !can_start(*position, rep->_map, mask_skip));
 }}}[[br]]
 It performs a continuous loop at this point.
 [[br]]
 == Steps to Reproduce ==
 {{{#0
 boost::re_detail_106600::perl_matcher<__gnu_cxx::__normal_iterator<char
 const*, std::__cxx11::basic_string<char, std::char_traits<char>,
 std::allocator<char> > >,
 std::allocator<boost::sub_match<__gnu_cxx::__normal_iterator<char const*,
 std::__cxx11::basic_string<char, std::char_traits<char>,
 std::allocator<char> > > > >, boost::regex_traits<char,
 boost::cpp_regex_traits<char> > >::unwind_greedy_single_repeat
 (this=0x7fffffffc600, r=0x0)
     at ./boost_1_66_0/boost/regex/v4/perl_matcher_non_recursive.hpp:1411
 #1 0x00000000006a2ec3 in
 boost::re_detail_106600::perl_matcher<__gnu_cxx::__normal_iterator<char
 const*, std::__cxx11::basic_string<char, std::char_traits<char>,
 std::allocator<char> > >,
 std::allocator<boost::sub_match<__gnu_cxx::__normal_iterator<char const*,
 std::__cxx11::basic_string<char, std::char_traits<char>,
 std::allocator<char> > > > >, boost::regex_traits<char,
 boost::cpp_regex_traits<char> > >::unwind (this=0x7fffffffc600,
 have_match=0x0)
     at ./boost_1_66_0/boost/regex/v4/perl_matcher_non_recursive.hpp:1266
 #2 0x00000000006a92c3 in
 boost::re_detail_106600::perl_matcher<__gnu_cxx::__normal_iterator<char
 const*, std::__cxx11::basic_string<char, std::char_traits<char>,
 std::allocator<char> > >,
 std::allocator<boost::sub_match<__gnu_cxx::__normal_iterator<char const*,
 std::__cxx11::basic_string<char, std::char_traits<char>,
 std::allocator<char> > > > >, boost::regex_traits<char,
 boost::cpp_regex_traits<char> > >::match_all_states (this=0x7fffffffc600)
     at ./boost_1_66_0/boost/regex/v4/perl_matcher_non_recursive.hpp:214
 #3 0x00000000006a25d9 in
 boost::re_detail_106600::perl_matcher<__gnu_cxx::__normal_iterator<char
 const*, std::__cxx11::basic_string<char, std::char_traits<char>,
 std::allocator<char> > >,
 std::allocator<boost::sub_match<__gnu_cxx::__normal_iterator<char const*,
 std::__cxx11::basic_string<char, std::char_traits<char>,
 std::allocator<char> > > > >, boost::regex_traits<char,
 boost::cpp_regex_traits<char> > >::match_prefix (this=0x7fffffffc600)
     at ./boost_1_66_0/boost/regex/v4/perl_matcher_common.hpp:336
 #4 0x00000000005ed580 in
 boost::re_detail_106600::perl_matcher<__gnu_cxx::__normal_iterator<char
 const*, std::__cxx11::basic_string<char, std::char_traits<char>,
 std::allocator<char> > >,
 std::allocator<boost::sub_match<__gnu_cxx::__normal_iterator<char const*,
 std::__cxx11::basic_string<char, std::char_traits<char>,
 std::allocator<char> > > > >, boost::regex_traits<char,
 boost::cpp_regex_traits<char> > >::match_imp (this=0x7fffffffc600) at
 ./boost_1_66_0/boost/regex/v4/perl_matcher_common.hpp:220
 #5 0x00000000005ecb5f in
 boost::re_detail_106600::perl_matcher<__gnu_cxx::__normal_iterator<char
 const*, std::__cxx11::basic_string<char, std::char_traits<char>,
 std::allocator<char> > >,
 std::allocator<boost::sub_match<__gnu_cxx::__normal_iterator<char const*,
 std::__cxx11::basic_string<char, std::char_traits<char>,
 std::allocator<char> > > > >, boost::regex_traits<char,
 boost::cpp_regex_traits<char> > >::match (this=0x7fffffffc600) at
 ./boost_1_66_0/boost/regex/v4/perl_matcher_common.hpp:193
 #6 0x00000000004f353f in
 boost::regex_match<__gnu_cxx::__normal_iterator<char const*,
 std::__cxx11::basic_string<char, std::char_traits<char>,
 std::allocator<char> > >,
 std::allocator<boost::sub_match<__gnu_cxx::__normal_iterator<char const*,
 std::__cxx11::basic_string<char, std::char_traits<char>,
 std::allocator<char> > > > >, char, boost::regex_traits<char,
 boost::cpp_regex_traits<char> > > (first=0x0, last=0x0, m=..., e=...,
 flags=boost::regex_constants::match_partial)
     at ./boost_1_66_0/boost/regex/v4/regex_match.hpp:50
 Python Exception <class 'gdb.error'> There is no member named
 _M_dataplus.:
 #7 0x00000000004f20f4 in boost::regex_match<std::char_traits<char>,
 std::allocator<char>,
 std::allocator<boost::sub_match<__gnu_cxx::__normal_iterator<char const*,
 std::__cxx11::basic_string<char, std::char_traits<char>,
 std::allocator<char> > > > >, char, boost::regex_traits<char,
 boost::cpp_regex_traits<char> > > (s=, m=..., e=...,
 flags=boost::regex_constants::match_partial) at
 ./boost_1_66_0/boost/regex/v4/regex_match.hpp:82
 }}}

-- 
Ticket URL: <https://svn.boost.org/trac10/ticket/13459>
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 : 2018-02-28 15:14:34 UTC