Boost C++ Libraries: Ticket #6433: Problem in the release mode with the Boost::Regex::Regex_match and search https://svn.boost.org/trac10/ticket/6433 <p> #include "boost/regex.hpp" Problem: </p> <p> boost::regex rx("Hello word"); if(boost::regex_search(iFileName, rx)) <em>access violation { </em></p> <blockquote> <p> .... </p> </blockquote> <p> } </p> <p> walk around: #include "boost/tr1/regex.hpp" std::tr1::regex rx("Hello world"); </p> <p> if(std::tr1::regex_search(iFileName, rx)) { </p> <blockquote> <p> result = true; </p> </blockquote> <p> } </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/6433 Trac 1.4.3 anonymous Sat, 21 Jan 2012 09:28:13 GMT <link>https://svn.boost.org/trac10/ticket/6433#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/6433#comment:1</guid> <description> <p> Fairly obviously this works for me, and is the sort of thing we test all the time. </p> <p> Please provide: </p> <ul><li>The compiler and platform used. </li><li>A reduced self contained test case that allows us to reproduce the issue. </li></ul><p> Also note that normally, odd issues like this are caused by a binary incompatibility between the regex lib and your executable (ie different build options used for each), so please check that if you're able. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>John Maddock</dc:creator> <pubDate>Sun, 08 Jul 2012 07:47:25 GMT</pubDate> <title>status changed; resolution set https://svn.boost.org/trac10/ticket/6433#comment:2 https://svn.boost.org/trac10/ticket/6433#comment:2 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">worksforme</span> </li> </ul> <p> Closed pending further information. </p> Ticket s.a.h. Tue, 06 Nov 2012 12:06:41 GMT <link>https://svn.boost.org/trac10/ticket/6433#comment:3 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/6433#comment:3</guid> <description> <p> I am facing the same problem. I am using Intel 11.1 compiler and boost 1.51. It's crashing only in Release mode. It works fine with boost 1.45. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>s.a.h.</dc:creator> <pubDate>Tue, 06 Nov 2012 12:23:54 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/6433#comment:4 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/6433#comment:4</guid> <description> <p> The problem is happening on Windows only. </p> <p> Anyone knows what is the difference in regex lib in boost 1.45c and 1.51? </p> </description> <category>Ticket</category> </item> <item> <dc:creator>John Maddock</dc:creator> <pubDate>Tue, 06 Nov 2012 16:55:41 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/6433#comment:5 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/6433#comment:5</guid> <description> <blockquote class="citation"> <p> Anyone knows what is the difference in regex lib in boost 1.45c and 1.51? </p> </blockquote> <p> Very little other than some almost-trivial bug fixes. There may well be changes to the Regex lib's dependencies though. </p> <p> I just tried running the regex lib regression tests with Intel-11.1 and Intel-12.1 in release mode (Win32), and all the tests pass for me here. </p> <p> Suggest the problem is likely to be: </p> <p> 1) Linking to the wrong .lib file (are you using the auto-linking support?) 2) Incorrect include path pulling in the wrong Boost version when you switched to release mode. 3) Some other compiler option used in release mode that results in code binary-incompatible with the .lib's. </p> <p> You could try: </p> <p> 1) cd into libs/regex/test and do a "bjam toolset=intel release" and make sure the tests pass on your machine with your specific Intel revision. 2) If you can't spot the error from the suggestions above, try defining BOOST_REGEX_NO_LIB in your project settings and adding libs/regex/src/*.cpp direct to your projects source files. </p> <p> HTH, John Maddock. </p> </description> <category>Ticket</category> </item> </channel> </rss>