Boost C++ Libraries: Ticket #6985: regex_regress_threaded randomly crashes in ICU interface tests https://svn.boost.org/trac10/ticket/6985 <p> When the regex tests are built with the ICU libraries, the regex_regress_threaded test randomly crashes in ICU interface tests. </p> <p> For example, when using ICU 4.4 with Boost (trunk) compiled with gcc 4.6.1 on Ubuntu 11.10, the regex_regress_threaded test run ten times by a shell script outputs the following: </p> <pre class="wiki">no errors detected no errors detected no errors detected no errors detected no errors detected no errors detected no errors detected no errors detected no errors detected terminate called after throwing an instance of 'std::length_error' what(): basic_string::_S_create **** exception(210): signal: SIGABRT (application abort requested) ******** errors detected; see standard output for details ******** </pre><p> I have also tried compiling the ICU library from source for versions 4.4, 4.6, 4.8 and 4.9 and similar crashes are reported from the ICU interface tests. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/6985 Trac 1.4.3 anonymous Thu, 14 Jun 2012 11:53:20 GMT <link>https://svn.boost.org/trac10/ticket/6985#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/6985#comment:1</guid> <description> <p> I think I have this fixed in SVN: I just fixed a couple of valgrind errors that were showing up. Helgrind still reports some errors inside ICU, but I think these are spurious (valgrind doesn't know about ICU's memory management routines). </p> <p> Can you please retest? </p> <p> Many thanks, John. </p> </description> <category>Ticket</category> </item> <item> <author>Clifford Hung <chung@…></author> <pubDate>Thu, 14 Jun 2012 19:41:33 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/6985#comment:2 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/6985#comment:2</guid> <description> <p> That seems to have resolved it on trunk using ICU 4.4 (both ones supplied by Ubuntu and compiled libraries). </p> <p> I mistakenly said that I had tried ICU versions 4.6 to 4.9 on trunk, that was actually on 1.48.0. On trunk, those ICU versions fail the has_icu_test as follows: </p> <pre class="wiki">../../../bin.v2/libs/regex/build/gcc-4.6.1/debug/has_icu_test.o: In function `main': /home/chung/dev/boost-trunk/libs/regex/test/../../../libs/regex/build/has_icu_test.cpp:24: undefined reference to `u_charFromName_49' </pre><p> I used the same bjam command to build from boost/libs/regex/test on trunk as on 1.48.0, so I'm not sure why it is failing. Example: </p> <pre class="wiki">../../../bjam -a include=/home/chung/dev/icu-linux-4.9/source/common "linkflags=-L/home/chung/dev/icu-linux-4.9/build/lib" </pre><p> I applied the diff of revision 78940 vs 78480 to Boost 1.48.0 and the regex test passes for ICU 4.4. However, for ICU 4.6, 4.8 and 4.9 I am getting an error about unexpected exceptions (std::bad_alloc). Here's an excerpt: </p> <pre class="wiki">regress/test_sets.cpp:52: Error in test here: regress/test_icu.cpp:351:Received an unexpected std::exception: std::bad_alloc (While testing ICU interfaces) regress/test_sets.cppregress/test_sets.cpp:52: Error in test here: regress/test_icu.cpp:351:Received an unexpected std::exception: std::bad_alloc (While testing ICU interfaces) regress/test_sets.cpp:53: Error in test here: regress/test_icu.cpp:351:Received an unexpected std::exception: std::bad_alloc (While testing ICU interfaces) </pre> </description> <category>Ticket</category> </item> <item> <dc:creator>anonymous</dc:creator> <pubDate>Thu, 21 Jun 2012 10:58:27 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/6985#comment:3 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/6985#comment:3</guid> <description> <blockquote class="citation"> <p> I mistakenly said that I had tried ICU versions 4.6 to 4.9 on trunk, that was actually on 1.48.0. On trunk, those ICU versions fail the has_icu_test as follows: </p> </blockquote> <p> I believe this is caused by the linker finding the wrong ICU library versions, try: </p> <p> bjam -sICU_PATH=/home/chung/dev/icu-linux-4.9 </p> <blockquote class="citation"> <p> However, for ICU 4.6, 4.8 and 4.9 I am getting an error about unexpected exceptions (std::bad_alloc). Here's an excerpt: </p> </blockquote> <p> Works for me with ICU-49 on Win32 and Ubuntu x86. Could this be due to LD_LIBRARY_PATH not being set and the libraries not being loaded correctly? </p> <p> Otherwise what's the platform? </p> </description> <category>Ticket</category> </item> <item> <author>Clifford Hung <chung@…></author> <pubDate>Thu, 21 Jun 2012 14:06:08 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/6985#comment:4 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/6985#comment:4</guid> <description> <p> Replying to <a class="ticket" href="https://svn.boost.org/trac10/ticket/6985#comment:3" title="Comment 3">anonymous</a>: </p> <blockquote class="citation"> <blockquote class="citation"> <p> I mistakenly said that I had tried ICU versions 4.6 to 4.9 on trunk, that was actually on 1.48.0. On trunk, those ICU versions fail the has_icu_test as follows: </p> </blockquote> <p> I believe this is caused by the linker finding the wrong ICU library versions, try: </p> <p> bjam -sICU_PATH=/home/chung/dev/icu-linux-4.9 </p> <blockquote class="citation"> <p> However, for ICU 4.6, 4.8 and 4.9 I am getting an error about unexpected exceptions (std::bad_alloc). Here's an excerpt: </p> </blockquote> <p> Works for me with ICU-49 on Win32 and Ubuntu x86. Could this be due to LD_LIBRARY_PATH not being set and the libraries not being loaded correctly? </p> <p> Otherwise what's the platform? </p> </blockquote> <p> Passing ICU_PATH for the build on boost-trunk allows it to pass the has_icu_test but the regex test fails due to the std:bad_alloc exceptions as with 1.48.0. The platform I am using for Ubuntu is a Lenovo W500 (Core 2 Duo, 4 GB memory). </p> </description> <category>Ticket</category> </item> <item> <dc:creator>John Maddock</dc:creator> <pubDate>Sun, 08 Jul 2012 18:08:54 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/6985#comment:5 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/6985#comment:5</guid> <description> <p> I'm stuck. </p> <p> Passes for me on both 32 and 64 bit Ubuntu, also tried various ICU versions. </p> <p> Note that regex itself doesn't throw bad_alloc from anywhere, so the exception must be coming from the std lib or ICU itself. Any chance you can do some debugging? </p> <p> Thanks, John. </p> </description> <category>Ticket</category> </item> <item> <author>Clifford Hung <chung@…></author> <pubDate>Tue, 10 Jul 2012 13:51:13 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/6985#comment:6 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/6985#comment:6</guid> <description> <p> Could you list the steps you took to compile ICU and Boost Regex just to rule out differences in the build? </p> </description> <category>Ticket</category> </item> <item> <dc:creator>John Maddock</dc:creator> <pubDate>Tue, 10 Jul 2012 17:04:06 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/6985#comment:7 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/6985#comment:7</guid> <description> <p> Nothing special, for the ICU version installed via Ubuntu's package manager it's just: </p> <pre class="wiki">cd libs/regex/test bjam </pre><p> And ICU is found and used OK. </p> <p> For versions I built, it's the normal: </p> <pre class="wiki">./configure --prefix=some-local-path make make install </pre><p> For ICU, and then: </p> <pre class="wiki">export LD_LIBRARY_PATH=some-local-path/bin bjam -sICU_PATH=some-local-path </pre><p> For regex. </p> <p> The errors you're getting smell like some sort of misconfiguration - mismatched link and runtime ICU versions? But it's hard to tell for sure. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>John Maddock</dc:creator> <pubDate>Wed, 13 Feb 2013 18:38:23 GMT</pubDate> <title>status changed; resolution set https://svn.boost.org/trac10/ticket/6985#comment:8 https://svn.boost.org/trac10/ticket/6985#comment:8 <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> Waiting for response... works for me. </p> Ticket