[Libreoffice] [SOLVED] Debug-mode getline-using sal unittest crashes, triggered by _GLIBCXX_DEBUG

Julien Nabet serval2412 at yahoo.fr
Fri Jun 24 11:02:45 PDT 2011


Le 24/06/2011 14:19, Caolán McNamara a écrit :
> On Thu, 2011-06-23 at 19:57 +0100, serv serva wrote:
>> Your theory was right, I commented out all that concerns _GLIBCXX_DEBUG in :
>> - sal/inc/unxgcc.mk
>> - sal/gbuild/platform/unxgcc.mk
>>
>> Then remove sal/unxlng* and build again.
>> Everything is ok.
> Excellent, so...
>
> We don't want anyone else to get hung up on that, so ideally we want a
> bug filed against your distros libstdc++ about this. So could you see if
> the test-case at
> http://lists.apple.com/archives/cocoa-dev/2009/Sep/msg01096.html
>
> when compiled with g++ -D_GLIBCXX_DEBUG crashes when you do
> echo hello world | ./a.out and file a bug against whatever version of
> libstdc++ you have about it.
Hello,

Badfully, I don't reproduce the pb with this file.
I made a rm -rf sal/unxlng* with the unchanged (so with GLIBCXX_DEBUG) 
files :
- sal/inc/unxgcc.mk
- sal/gbuild/platform/unxgcc.mk
and there's still the pb.


But when i use  the test file, nothing as you can see below :

$ g++ -D_GLIBCXX_DEBUG attachment.cxx
$ echo hello world | ./a.out
Line is: "hello world"

$ cat attachment.cxx
//compile with g++ -D_GLIBCXX_DEBUG
//see http://lists.apple.com/archives/cocoa-dev/2009/Sep/msg01096.html
//see 
http://lists.freedesktop.org/archives/libreoffice/2011-June/014191.html

#include <iostream>
#include <string>

int main (int argc, char * const argv[])
{
    std::string line;
    std::getline(std::cin, line);
    std::cout << "Line is: \"" << line << "\"" << std::endl;
    return 0;
}

Julien.


More information about the LibreOffice mailing list