Opened 10 years ago

Closed 10 years ago

#7143 closed Bugs (fixed)

xpressive: run time assertion when compiled with clang 3.1 and -std=c++0x

Reported by: J.P.Fletcher@… Owned by: Eric Niebler
Milestone: To Be Determined Component: xpressive
Version: Boost 1.50.0 Severity: Problem
Keywords: xpressive runtime assertion C++11 Cc: eric@…

Description

Example code fails at run time with an assertion failure when compiled with -std=c++0x and not when compiled without -std=c++0x. System Ubuntu 10.04 64 bit, compiler Clang 3.1, -std=c++0x also uses libc++.

boost_1_50_0/boost/xpressive/traits/cpp_regex_traits.hpp:273: void boost::xpressive::detail::cpp_regex_traits_base<char, 1>::imbue(const std::locale &) [Char = char, SizeOfChar = 1]: Assertion `0 == (this->masks_[i] & non_std_ctype_masks)' failed.

Example code attached.

Attachments (1)

map_example2.cpp (3.8 KB ) - added by anonymous 10 years ago.

Download all attachments as: .zip

Change History (6)

by anonymous, 10 years ago

Attachment: map_example2.cpp added

comment:1 by Eric Niebler, 10 years ago

Component: protoxpressive
Keywords: xpressive added; Proto removed
Summary: proto: run time assertion when compiled with clang 3.1 and -std=c++0xxpressive: run time assertion when compiled with clang 3.1 and -std=c++0x

comment:2 by Eric Niebler, 10 years ago

Status: newassigned

I think [79589] on trunk corrects this. I have been unable to get clang/libc++ working, so I can't test this. Can you give it a shot, please?

comment:3 by Eric Niebler, 10 years ago

My change on trunk broke many platforms so I reverted it. I'll need your help to fix this. Can you set a breakpoint at the point where the code asserts and tell me what the value of (this->masks_[i] & non_std_ctype_masks) is?

comment:4 by Eric Niebler, 10 years ago

Thanks for your help thus far, John. The bug in cpp_regex_traits is fixed in trunk as of [79732]. For your efforts, you got a mention in xpressive's Acknowledgements section.

Leaving this open until the fix is merged to release. Also, I suspect there is another bug lurking in the c_regex_traits, which you can confirm if you get xpressive's test suite to run successfully. If so, you can report it here. No need to open another issue.

comment:5 by Eric Niebler, 10 years ago

Resolution: fixed
Status: assignedclosed
Note: See TracTickets for help on using tickets.