Thread: [Cppunit-devel] Having a memory leak problem
Brought to you by:
blep
From: Doug S. <do...@hu...> - 2002-05-04 19:30:19
|
Hi, developers! First of all, cppunit is a wonderful tool. I very big "thank you" to all who have worked to develop it! I am using CPPUNIT_ASSERT() in a loop that executes 256**3 times. I am seeing a memory leak that happens only when I use CPPUNIT_ASSERT() -- I don't see the memory leak when I use the assert() macro from the standard C library. The evaluation of the boolean expressions don't create any objects, nor do they allocate any memory. (At first, I thought that the expressions weren't being evaluated with the assert() macro because of NDEBUG, so I verified that they were evaulated.) The memory leak consumes a lot of memory because of the number of assertions that are evaluated, making the CCPUNIT_ASSERT() macro unusable. I use Visual C++ 6 and version 1.8.0 of cppunit. I used the included project file to build it (no changes), and I'm using cppunit.lib. I use the TextUi. I spent some time looking at the cppunit source code, but I couldn't find anything that looked like a memory leak. The assert condition never fails, so (I believe that implies) the exception isn't being thrown. Does anyone have any idea where there might be a memory leak? I can also try to run the same code on Solaris with Forte C++ and GCC and on Linux with GCC. That could help to verify if this is just a Visual C++ problem. ------------------------------------------- Doug Sauder Software Architect Hunny Software, Inc Email: do...@hu... Phone: 301-948-6999 |
From: Baptiste L. <gai...@fr...> - 2002-05-07 21:43:57
|
Would you mind sending me your test programm (how do you detect the leaks ?). I have a good idea on how to chase it. Thanks in advance, Baptiste. ----- Original Message ----- From: "Doug Sauder" <do...@hu...> To: <cpp...@li...> Sent: Saturday, May 04, 2002 9:29 PM Subject: [Cppunit-devel] Having a memory leak problem > Hi, developers! > > First of all, cppunit is a wonderful tool. I very big "thank you" to all > who have worked to develop it! > > I am using CPPUNIT_ASSERT() in a loop that executes 256**3 times. I am > seeing a memory leak that happens only when I use CPPUNIT_ASSERT() -- I > don't see the memory leak when I use the assert() macro from the standard C > library. The evaluation of the boolean expressions don't create any > objects, nor do they allocate any memory. (At first, I thought that the > expressions weren't being evaluated with the assert() macro because of > NDEBUG, so I verified that they were evaulated.) The memory leak consumes > a lot of memory because of the number of assertions that are evaluated, > making the CCPUNIT_ASSERT() macro unusable. > > I use Visual C++ 6 and version 1.8.0 of cppunit. I used the included > project file to build it (no changes), and I'm using cppunit.lib. I use > the TextUi. > > I spent some time looking at the cppunit source code, but I couldn't find > anything that looked like a memory leak. The assert condition never fails, > so (I believe that implies) the exception isn't being thrown. > > Does anyone have any idea where there might be a memory leak? > > I can also try to run the same code on Solaris with Forte C++ and GCC and > on Linux with GCC. That could help to verify if this is just a Visual C++ > problem. > > > ------------------------------------------- > Doug Sauder > Software Architect > Hunny Software, Inc > Email: do...@hu... > Phone: 301-948-6999 > > > _______________________________________________________________ > > Have big pipes? SourceForge.net is looking for download mirrors. We supply > the hardware. You get the recognition. Email Us: ban...@so... > _______________________________________________ > Cppunit-devel mailing list > Cpp...@li... > https://lists.sourceforge.net/lists/listinfo/cppunit-devel > |
From: Luis J. <ljo...@cr...> - 2002-05-20 15:19:12
|
Hello, Cppunit is a great tool! The defined Macros help a lot, simplifying the code. My question is: does anyone has produced a XML output similar to JUnit's ? It would be very helpful to use the same XSL. Waiting for an answer, thanks in advance, Luis Joaquim |
From: Baptiste L. <gai...@fr...> - 2002-05-22 17:26:32
|
In the contrib directory you can find some XSL scripts to convert the XML output to HTML. You can find a few other at: http://www.trickpalace.net/cppll/cuppa/work/ (thanks to 'cuppa' project team). What is JUnit format ? Could the conversion be done with a simple XSL script ? Baptiste. ----- Original Message ----- From: "Luis Joaquim" <ljo...@cr...> To: <cpp...@li...> Sent: Monday, May 20, 2002 5:18 PM Subject: [Cppunit-devel] XML Log Report > Hello, > > Cppunit is a great tool! > > The defined Macros help a lot, simplifying the code. > > My question is: does anyone has produced a XML output similar to > JUnit's ? > > It would be very helpful to use the same XSL. > > Waiting for an answer, > > thanks in advance, > > Luis Joaquim > > > _______________________________________________________________ > Hundreds of nodes, one monster rendering program. > Now that's a super model! Visit http://clustering.foundries.sf.net/ > > _______________________________________________ > Cppunit-devel mailing list > Cpp...@li... > https://lists.sourceforge.net/lists/listinfo/cppunit-devel > |
From: Luis J. <ljo...@cr...> - 2002-05-22 17:37:17
|
Hello, Thanks for your URL. "JUnit format" is not a good expression. What I meant is XML format similiar to JUnit - in order to use the same XSL. But, let me explain my problem: thoses logs (even the ones in the URL you sent) don't show the SUITE of the tests! :( For instance, if I have two classes (suites), each one has two methods (a, b, c, d), I don't want to simply know: test d failed. I want to know in which suite the test is. (you can see this in a JUnit report). --another question: WHERE is the cppunit 1.9 ?!? I will wait for you anwser. Thanks again, Luis Joaquim Wednesday, May 22, 2002, 6:18:19 PM, you wrote: BL> In the contrib directory you can find some XSL scripts to convert the XML BL> output to HTML. You can find a few other at: BL> http://www.trickpalace.net/cppll/cuppa/work/ BL> (thanks to 'cuppa' project team). BL> What is JUnit format ? Could the conversion be done with a simple XSL script BL> ? BL> Baptiste. BL> ----- Original Message ----- BL> From: "Luis Joaquim" <ljo...@cr...> BL> To: <cpp...@li...> BL> Sent: Monday, May 20, 2002 5:18 PM BL> Subject: [Cppunit-devel] XML Log Report >> Hello, >> >> Cppunit is a great tool! >> >> The defined Macros help a lot, simplifying the code. >> >> My question is: does anyone has produced a XML output similar to >> JUnit's ? >> >> It would be very helpful to use the same XSL. >> >> Waiting for an answer, >> >> thanks in advance, >> >> Luis Joaquim >> >> >> _______________________________________________________________ >> Hundreds of nodes, one monster rendering program. >> Now that's a super model! Visit http://clustering.foundries.sf.net/ >> >> _______________________________________________ >> Cppunit-devel mailing list >> Cpp...@li... >> https://lists.sourceforge.net/lists/listinfo/cppunit-devel >> --- Luis Joaquim Critical Software, S.A. R. Pedro Nunes, IPN 3030-199 Coimbra - Portugal Tel: +351.239.700.945 - Fax +351.239.700.905 http://www.criticalsoftware.com ljo...@cr... |
From: Baptiste L. <gai...@fr...> - 2002-05-22 17:55:46
|
As usal, the snapshop can be found at: http://cppunit.sourceforge.net/snapshot/ http://cppunit.sourceforge.net/snapshot/cppunit-1.9.6.tar.gz http://cppunit.sourceforge.net/snapshot/cppunit-docs-1.9.6.tar.gz See below... ----- Original Message ----- From: "Luis Joaquim" <ljo...@cr...> To: "Baptiste Lepilleur" <gai...@fr...> Cc: <cpp...@li...> Sent: Wednesday, May 22, 2002 7:36 PM Subject: Re[2]: [Cppunit-devel] XML Log Report > Hello, > > Thanks for your URL. > > "JUnit format" is not a good expression. What I meant is XML format > similiar to JUnit - in order to use the same XSL. > > But, let me explain my problem: thoses logs (even the ones in the URL > you sent) don't show the SUITE of the tests! :( > > For instance, if I have two classes (suites), each one has two methods (a, b, > c, d), I don't want to simply know: test d failed. How are you creating your test suite? The helper macros include the test fixture name in the test name (to solve the problem indicated above). Baptiste. --- Baptiste Lepilleur <gai...@fr...> http://gaiacrtn.free.fr/ |