Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
4.2.1
-
None
-
Sun Studio C++ 12 on Solaris 10u5 AMD64, wide mode
-
Runtime Error
Description
As discussed in this thread, when compiled as 64 bit with Sun Studio C++ 12 on Solaris 10u5 AMD64,
the program below crashes on some systems:
#include <locale> #include <string> int main() { std::locale loc = std::locale("fr_FR"); std::string s1("Et la marine va venir à Malte"); std::string s2("Et la marine va venir à Malte"); const std::collate<std::string::value_type>& col = std::use_facet<std::collate<std::string::value_type> >(loc); if (col.compare(s1.c_str(), s1.c_str() + s1.length(), s2.c_str(), s2.c_str() + s2.length()) == 0) return 1; return 0; }