Date: prev next · Thread: first prev next last
2011 Archives by date, by thread · List index


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
$ echo hello world| valgrind ./a.out
==2612== Memcheck, a memory error detector
==2612== Copyright (C) 2002-2010, and GNU GPL'd, by Julian Seward et al.
==2612== Using Valgrind-3.6.1 and LibVEX; rerun with -h for copyright info
==2612== Command: ./a.out
==2612==
Line is: "hello world"
==2612==
==2612== HEAP SUMMARY:
==2612==     in use at exit: 0 bytes in 0 blocks
==2612==   total heap usage: 5 allocs, 5 frees, 96 bytes allocated
==2612==
==2612== All heap blocks were freed -- no leaks are possible
==2612==
==2612== For counts of detected and suppressed errors, rerun with: -v
==2612== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 17 from 6)
$
And was this with a system cppunit or the built-in one ?
libcppunit-1.12-1 and libcppunit-dev are not installed and in config.log, I've got :
configure:14349: checking which cppunit to use
configure:14449: result: internal

So I suppose I use the build-in one.

Are there other tests I could do ?

Julien.


Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.