[Boost-bugs] [Boost C++ Libraries] #6440: Regex crash in object_cache in many-locale mulithreaded scenarios

Subject: [Boost-bugs] [Boost C++ Libraries] #6440: Regex crash in object_cache in many-locale mulithreaded scenarios
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2012-01-23 21:16:56


#6440: Regex crash in object_cache in many-locale mulithreaded scenarios
-----------------------------------------------+----------------------------
 Reporter: Hamid Palo <hamid.palo@…> | Owner: johnmaddock
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: regex
  Version: Boost 1.48.0 | Severity: Showstopper
 Keywords: |
-----------------------------------------------+----------------------------
 An intermittent crash occurs in object_cache when using regex in apps with
 many locales in multithreaded apps. The crash occurs due to pos not being
 decrementable in object_cache.hpp line 154 in boost 1.48.0.

 Stack:

 {{{
 msvcr90!_invalid_parameter_noinfo+0xc
 myapp!boost::object_cache<unsigned
 long,boost::re_detail::w32_regex_traits_implementation<wchar_t>
>::do_get+0x533
 myapp!boost::object_cache<unsigned
 long,boost::re_detail::w32_regex_traits_implementation<wchar_t>
>::get+0x69
 myapp!boost::re_detail::create_w32_regex_traits<wchar_t>+0x1b
 myapp!boost::re_detail::regex_data<wchar_t,boost::regex_traits<wchar_t,boost::w32_regex_traits<wchar_t>
>
>::regex_data<wchar_t,boost::regex_traits<wchar_t,boost::w32_regex_traits<wchar_t>
> >+0x6c
 myapp!boost::basic_regex<wchar_t,boost::regex_traits<wchar_t,boost::w32_regex_traits<wchar_t>
> >::do_assign+0x5f
 myapp!boost::basic_regex<wchar_t,boost::regex_traits<wchar_t,boost::w32_regex_traits<wchar_t>
> >::assign+0x23
 myapp!match+0x131
 }}}


 The attached program reproes this consistently in anywhere from 1 min to
 10 min on my Xeon workstation running Win7 x64 and using msvc version
 16.00.40219.01. I have not tried any other compilers yet.

 The attached code also does not call regex directly but rather it
 manipulates object_cache directly in the same way that w32_regex_traits
 does in order to get an easier repro.

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