null instruction ptr bugcheck in regexp

Hello! I am using boost regexp to do string/expression match. I got several dump files that have the same call stack when the crash happends. What my code does is copying user buffer (containing string to be mached) to an internal allocated buffer and then call boost regexp functions. From the dmp files, I can tell that register EBP is corrupted in the function boost::re_detail::abstract_protected_call::execute. Before this function, the value of EBP value is correct. Any idea what the cause is? Is there any similar problem that has been known already? Here is the callstack when crash happened. ==============================================================================
00000000() nlca_framework.dll!boost::re_detail::perl_matcher<std::_String_const_iterator<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t> >,std::allocator<boost::sub_match<std::_String_const_iterator<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t> > > >,boost::regex_traits<wchar_t,boost::w32_regex_traits<wchar_t> > >::match_all_states() + 0x9a bytes C++ nlca_framework.dll!boost::re_detail::perl_matcher<std::_String_const_iterator<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t> >,std::allocator<boost::sub_match<std::_String_const_iterator<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t> > > >,boost::regex_traits<wchar_t,boost::w32_regex_traits<wchar_t> > >::match_startmark() + 0x194 bytes C++ nlca_framework.dll!boost::re_detail::perl_matcher<std::_String_const_iterator<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t> >,std::allocator<boost::sub_match<std::_String_const_iterator<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t> > > >,boost::regex_traits<wchar_t,boost::w32_regex_traits<wchar_t> > >::match_all_states() + 0x9a bytes C++ nlca_framework.dll!boost::re_detail::perl_matcher<std::_String_const_iterator<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t> >,std::allocator<boost::sub_match<std::_String_const_iterator<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t> > > >,boost::regex_traits<wchar_t,boost::w32_regex_traits<wchar_t> > >::match_prefix() + 0x39 bytes C++ nlca_framework.dll!boost::re_detail::perl_matcher<std::_String_const_iterator<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t> >,std::allocator<boost::sub_match<std::_String_const_iterator<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t> > > >,boost::regex_traits<wchar_t,boost::w32_regex_traits<wchar_t> > >::find_restart_any() + 0xe0 bytes C++ nlca_framework.dll!boost::re_detail::abstract_protected_call::execute() + 0x41 bytes C++ nlca_framework.dll!boost::re_detail::perl_matcher<std::_String_const_iterator<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t> >,std::allocator<boost::sub_match<std::_String_const_iterator<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t> > > >,boost::regex_traits<wchar_t,boost::w32_regex_traits<wchar_t> > >::protected_call() + 0x48 bytes C++ nlca_framework.dll!boost::re_detail::perl_matcher<std::_String_const_iterator<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t> >,std::allocator<boost::sub_match<std::_String_const_iterator<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t> > > >,boost::regex_traits<wchar_t,boost::w32_regex_traits<wchar_t> > >::find() + 0xa bytes C++ nlca_framework.dll!boost::regex_search<std::_String_const_iterator<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t> >,std::allocator<boost::sub_match<std::_String_const_iterator<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t> > > >,wchar_t,boost::regex_traits<wchar_t,boost::w32_regex_traits<wchar_t> > >() + 0xac bytes C++ Heidi

Heidi Zhou <heidi_zhou <at> yahoo.com> writes:
I am using boost regexp to do string/expression match. I got several dump files that have the same call stack when the crash happends. [snip] ::match_all_states() +
Is it in a multi-threaded situation? It may be this issue: https://svn.boost.org/trac/boost/ticket/2713 See the fix here: https://svn.boost.org/trac/boost/changeset/51103 We've ran into this issue recently as well when upgrading to 1.39 from 1.34 (perhaps we didn't notice it before though). I hope to see this fix in an upcoming release. HTH, -Ryan

Ryan, Thank you for the information. Mine application is multi-threads one. Great. I am waiting for the new release then. Heidi ----- Original Message ---- From: Ryan Gallagher <ryan.gallagher@gmail.com> To: boost@lists.boost.org Sent: Wednesday, July 29, 2009 11:30:13 AM Subject: Re: [boost] null instruction ptr bugcheck in regexp Heidi Zhou <heidi_zhou <at> yahoo.com> writes:
I am using boost regexp to do string/expression match. I got several dump files that have the same call stack when the crash happends. [snip] ::match_all_states() +
Is it in a multi-threaded situation? It may be this issue: https://svn.boost.org/trac/boost/ticket/2713 See the fix here: https://svn.boost.org/trac/boost/changeset/51103 We've ran into this issue recently as well when upgrading to 1.39 from 1.34 (perhaps we didn't notice it before though). I hope to see this fix in an upcoming release. HTH, -Ryan _______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost

Heidi Zhou <heidi_zhou <at> yahoo.com> writes:
Great. I am waiting for the new release then.
You might try the patch in the meantime. You can get the unified diff to patch it from the link at the bottom of this page: https://svn.boost.org/trac/boost/changeset/51103 -Ryan
participants (2)
-
Heidi Zhou
-
Ryan Gallagher