[Solaris 10] SIGSEGV in std::collate::compare()
-----------------------------------------------
Key: STDCXX-1010
URL: https://issues.apache.org/jira/browse/STDCXX-1010
Project: C++ Standard Library
Issue Type: Bug
Components: 22. Localization
Affects Versions: 4.2.1
Environment: Sun Studio C++ 12 on Solaris 10u5 AMD64, wide mode
Reporter: Martin Sebor
As discussed in this [thread|http://markmail.org/message/zvrurah3kfvsss53],
when compiled as 64 bit with Sun Studio C++ 12 on Solaris 10u5 AMD64,
the program below crashes on some systems:
{noformat}
#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;
}
{noformat}
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.