2 Replies Latest reply: Sep 20, 2011 11:15 AM by paleozogt RSS

    BUG: std::string serious problems

    Cod3 Monk3y, Inc. Community Member

      _divy discovered this bug which I described in:



      Basically, std::string appears to be mismanaging the underlying character buffers.


      Compile this code with standard g++ and you'll get "b,a", but with Alchemy you'll get "b,b". This leads to serious errors in any STL container class that uses std::string, which you can see in _divy's earlier post.


      string s1;

      string s2;

      s1 = "a";

      s2 = s1; // copy constructor

      s1 = "b";

      // use your favorite TRACE function here

      TRACE(s1); // expected: "b", actual: "b"

      TRACE(s2); // expected: "a", actual: "b", ERROR


      I know Alchemy is an experimental product but I find it very useful. I'm very lucky that the code I'm porting doesn't use std::string. However std::string is a very useful utility class and it is absolutely CRITICAL for this to function correctly for the majority of STL code to work.


      Is there a formal bug submission process for Alchemy?