Opened 11 years ago
Closed 11 years ago
#6440 closed Bugs (fixed)
Regex crash in object_cache in many-locale mulithreaded scenarios
Reported by: | Owned by: | John Maddock | |
---|---|---|---|
Milestone: | To Be Determined | Component: | regex |
Version: | Boost 1.48.0 | Severity: | Showstopper |
Keywords: | Cc: |
Description
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.
Attachments (1)
Change History (2)
by , 11 years ago
Attachment: | boostcrash.cpp added |
---|
comment:1 by , 11 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Reproduction program.