id summary reporter owner description type status milestone component version severity resolution keywords cc 12624 bug error calling boost::make_u32regex() shane.quinlivan@… John Maddock "os: SunOS 5.11 11.2 sun4v sparc sun4v gcc:gcc (GCC) 4.8.2 boost regex:tried 1.59->1_63+ When calling boost::make_u32regex() with a regex like: '302-Found \\([0-9]+A[0-9]+\\)' The core occurs: #0 0x00142854 in boost::re_detail_106300::basic_regex_creator::append_set (this=0xffbfd5b0, char_set=...) at ./boost/regex/v4/basic_regex_creator.hpp:380 380 result->cclasses = char_set.classes(); I added some debug for char_set, and it was fine. The issue is with result ( boost::re_detail_106300::re_set_long *); this structure has 2 long long variables (8byte): cclasses, cnclasses after 3 * 4byte variables (csingles,cranges,cequivalents). from boost/regex/v4/states.hpp, the structure is: 203 /*** struct re_set_long *********************************************** 204 A wide character set of characters, following this structure will be 205 an array of type charT: 206 First csingles null-terminated strings 207 Then 2 * cranges NULL terminated strings 208 Then cequivalents NULL terminated strings 209 ***********************************************************************/ 210 template 211 struct re_set_long : public re_syntax_base 212 { 213 unsigned int csingles, cranges, cequivalents; 214 mask_type cclasses; 215 mask_type cnclasses; 216 bool isnot; 217 bool singleton; 218 }; When this struct definition is changed to force alignment: 203 /*** struct re_set_long *********************************************** 204 A wide character set of characters, following this structure will be 205 an array of type charT: 206 First csingles null-terminated strings 207 Then 2 * cranges NULL terminated strings 208 Then cequivalents NULL terminated strings 209 ***********************************************************************/ 210 template 211 struct __attribute__((__packed__)) re_set_long : public re_syntax_base 212 { 213 unsigned int csingles, cranges, cequivalents; 214 mask_type cclasses; 215 mask_type cnclasses; 216 bool isnot; 217 bool singleton; 218 }; All our unit tests pass, and no core occurs. This change also resolves the solaris issue mentioned here: http://lists.boost.org/boost-users/2010/03/57717.php " Bugs new To Be Determined regex Boost 1.63.0 Problem regex,solaris,bus error, SIGBUS