[Boost-bugs] [Boost C++ Libraries] #12222: Segmentation fault in boost::make_u32regex when trying to construct invalid regular expression

Subject: [Boost-bugs] [Boost C++ Libraries] #12222: Segmentation fault in boost::make_u32regex when trying to construct invalid regular expression
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2016-05-22 16:23:16


#12222: Segmentation fault in boost::make_u32regex when trying to construct invalid
regular expression
----------------------------------+-------------------------
 Reporter: electricityispower@… | Owner: johnmaddock
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: regex
  Version: Boost 1.61.0 | Severity: Regression
 Keywords: |
----------------------------------+-------------------------
 The following code produces segmentation fault with boost 1.61.0, icu
 57.1:

 {{{
 #include <boost/regex/icu.hpp>
 #include <iostream>

 int main()
 {
         auto rx = boost::make_u32regex("\\", boost::regex::basic);
         std::cout << boost::u32regex_search("qwerty", rx) << std::endl;
 }
 }}}

 Backtrace:

 {{{
 Program received signal SIGSEGV, Segmentation fault.
 0x00007ffff7b54b7b in boost::re_detail_106100::basic_regex_parser<int,
 boost::icu_regex_traits>::parse_basic()
  () from /usr/lib64/libboost_regex.so.1.61.0
 (gdb) bt
 #0 0x00007ffff7b54b7b in boost::re_detail_106100::basic_regex_parser<int,
 boost::icu_regex_traits>::parse_bas
 ic() () from /usr/lib64/libboost_regex.so.1.61.0
 #1 0x00007ffff7b565a6 in boost::re_detail_106100::basic_regex_parser<int,
 boost::icu_regex_traits>::parse(int
  const*, int const*, unsigned int) () from
 /usr/lib64/libboost_regex.so.1.61.0
 #2 0x00007ffff7b56a1d in boost::basic_regex<int,
 boost::icu_regex_traits>::do_assign(int const*, int const*,
 unsigned int) () from /usr/lib64/libboost_regex.so.1.61.0
 #3 0x0000000000406fa4 in boost::basic_regex<int,
 boost::icu_regex_traits>::assign(int const*, int const*, uns
 igned int) ()
 #4 0x000000000040631d in boost::basic_regex<int,
 boost::icu_regex_traits>::basic_regex<boost::u8_to_u32_itera
 tor<char const*, int> >(boost::u8_to_u32_iterator<char const*, int>,
 boost::u8_to_u32_iterator<char const*, in
 t>, unsigned int) ()
 #5 0x00000000004057ba in boost::basic_regex<int, boost::icu_regex_traits>
 boost::re_detail_106100::do_make_u3
 2regex<char const*>(char const*, char const*, unsigned int, mpl_::int_<1>
 const*) ()
 #6 0x00000000004050d5 in boost::make_u32regex(char const*, unsigned int)
 ()
 #7 0x0000000000404604 in main ()
 }}}

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