Uploaded image for project: 'C++ Standard Library'
  1. C++ Standard Library
  2. STDCXX-1010

[Solaris 10] SIGSEGV in std::collate::compare()

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 4.2.1
    • 4.2.2
    • 22. Localization
    • 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;
      } 
      

      Attachments

        Activity

          People

            sebor Martin Sebor
            sebor Martin Sebor
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - 2h
                2h
                Remaining:
                Remaining Estimate - 2h
                2h
                Logged:
                Time Spent - Not Specified
                Not Specified