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

Caolán McNamara caolanm at redhat.com
Tue Jun 28 05:45:29 PDT 2011


On Mon, 2011-06-27 at 20:05 +0200, Julien Nabet wrote:
> Le 27/06/2011 16:57, Caolán McNamara a écrit :
> > On Fri, 2011-06-24 at 20:02 +0200, Julien Nabet wrote:
> >> 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"
> > Hmm, hard to track down a reproducible test-case then. Anything in
> > echo hello world | valgrind ./a.out ?
> $ cat test.c
> #include <iostream>
> #include <string>
> 
> using namespace std;
> 
> int main (int argc, char * const argv[]) {
>      string line;
>      getline(cin, line);
>      cout << "Line is: \"" << line << "\"" << endl;
>     return 0;
> }
> $ g++ -D_GLIBCXX_DEBUG test.c
> configure:14449: result: internal

> Are there other tests I could do ?

I reckon this is basically a libstdc++ bug, so we're just looking for
either a reproducer we can submit a bug for, and/or a hackaround for
ourselves in the interim.

So, for a hackaround, I guess we might be looking at a mismatch between
how the internal cppunit is built and the outside world, so to test that
theory, try this patch to the internal cppunit makefile.mk and rm -rf
cppunit/unxlng* and rebuild it and rebuild those sal tests as well,
easiest to just blow them all away.

This might all be futile, be much nicer if we had a small standalone
test-case.

C.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cppunit.experiment.patch
Type: text/x-patch
Size: 487 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/libreoffice/attachments/20110628/5428aa9c/attachment.bin>


More information about the LibreOffice mailing list