In HEAD the exception class returns a const char* from a std::string::c_str() which is on the stack. Per definition of c_str() the returned pointer is only valid as long as a) the instance is valid, b) the string has not been modified.
Since the string object is on the stack, it will go out of scope and render the returned const char* invalid.
instead of keeping two string with general message and detailed message, the constructor now creates one full string containing the complete what() message. This string is guaranteed to stay valid as long as the exception is valid (which is plenty). Here's the patch to fix this.
Philipp Aumayr, Simon Opelt