Opened 5 years ago

#13459 new Bugs

boost/regex/v4/perl_matcher_non_recursive.hpp infinite loop bug

Reported by: komad <tlagyqls7@…> Owned by: John Maddock
Milestone: To Be Determined Component: regex
Version: Boost 1.66.0 Severity: Problem
Keywords: loop bug Cc:

Description

description

{{{ do

{

--position; --count; ++state_count;

}while(count && !can_start(*position, rep->_map, mask_skip));

}}}
It performs a continuous loop at this point.

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 }}}

Attachments (1)

slow-unit-8525c6224ae275d189a23b3c836f6d6a774fa5ed (2.7 KB ) - added by komad <tlagyqls7@…> 5 years ago.

Download all attachments as: .zip

Change History (1)

by komad <tlagyqls7@…>, 5 years ago

Note: See TracTickets for help on using tickets.