bugCERTI - Bugs: bug #23241, Memleaks + one compiler warning

 
 

bug #23241: Memleaks + one compiler warning

Submitted by:  Christian Ehrlicher <chehrlic>
Submitted on:  Tue 13 May 2008 11:52:32 AM UTC  
 
Category: CERTISeverity: 3 - Normal
Item Group: Software errorStatus: Fixed
Privacy: PublicAssigned to: Eric NOULARD <erk>
Open/Closed: ClosedRelease: 3.2.7
Reproducibility: Every TimeFixed Release: 3.3.0

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Wed 25 Jun 2008 08:20:37 AM UTC, comment #5:

Those trouble should be fixed in current CVS version.

Eric NOULARD <erk>
Project AdministratorIn charge of this item.
Tue 13 May 2008 12:47:29 PM UTC, comment #4:

Thank you for the information,
Any bug fixed for CERTI is one bug less :=)
So I'm pleased with almost any bug report.

If you are evaluating CERTI do not hesitate
to ask any question directly on
certi-devel:
http://lists.nongnu.org/mailman/listinfo/certi-devel
(you should subscribe since this is a subscriber-only list)

The CERTI community is growing those days
and others may gives you their feedback.

Eric NOULARD <erk>
Project AdministratorIn charge of this item.
Tue 13 May 2008 12:14:47 PM UTC, comment #3:

Currently I don't care for memleaks - we're in early testing and planning phase. I just noticed them and wanted to inform you about this.
So you can close the bug if you think I should wait for 3.3.0 :)

Christian Ehrlicher <chehrlic>
Tue 13 May 2008 12:12:15 PM UTC, comment #2:

Thanks you Christian,

In fact I've recently used valgrind on CERTI.
But we do push our effort on CVS version of CERTI
since it the result of a relatively big merge between
what you have in CERTI 3.2.7 and the work for making
CERTI handle heterogeneous federation:
https://savannah.nongnu.org/task/?6910

So unless we have missed some leaks, CERTI cvs should
be far better than 3.2.7.

In fact 3.2.7 was a sort of maintainance release before
merging heterogeneous work.

I planned to set up more systematic testing of CERTI
using CTest combined with a framework for distributed testing
(see http://lists.nongnu.org/archive/html/tsp-devel/2008-04/msg00017.html)

I want to include systematic valgrinding of RTIG and RTIA.

This is a work in progress.

May be you can try CERTI cvs or wait a little for CERTI 3.2.8
which may be CETI 3.3.0 :=)

Eric NOULARD <erk>
Project AdministratorIn charge of this item.
Tue 13 May 2008 12:12:07 PM UTC, comment #1:

Found another one: SocketUDP.cc:165

hp_local = (struct hostent *) malloc(sizeof(struct hostent));

and two lines later you kill it with

hp_local = (struct hostent *) gethostbyname(localhost);

oh, and why do you need a cast here (and then a c-style one...) :)

Christian Ehrlicher <chehrlic>
Tue 13 May 2008 11:52:32 AM UTC, original submission:

valgrind tells me that there're some memleaks (just started rtig, send a few bytes and stopped it with CTRL+C).

Here the warning:

/home/ehrlicher_c/delta3d/rti/certi-3.2.7-Source/RTIA/OwnershipManagement.cc: In member function ‘const char* certi::rtia::OwnershipManagement::attributeOwnedByFederate(certi::ObjectHandle, certi::AttributeHandle, certi::TypeException&)’:
/home/ehrlicher_c/delta3d/rti/certi-3.2.7-Source/RTIA/OwnershipManagement.cc:66: warning: address of local variable ‘rep’ returned

I've attached a small patch which should solve some memleaks but it would be nice if you could take a short look on valgrind + rtig by yourself.

Thx,
Christian

Christian Ehrlicher <chehrlic>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

Attached Files
file #15659:  certi.patch added by chehrlic (874B - text/x-patch)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by erk (Posted a comment)
  • -unavailable- added by chehrlic (Submitted the item)
  •  

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 8 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Wed 02 Jul 2008 08:52:22 AM UTCerkStatusReady For Test=>Fixed
      Open/ClosedOpen=>Closed
      Fixed ReleaseCVS=>3.3.0
    Wed 25 Jun 2008 08:20:37 AM UTCerkStatusNeed Info=>Ready For Test
      Fixed ReleaseUnknown=>CVS
    Tue 13 May 2008 12:12:15 PM UTCerkStatusNone=>Need Info
      Assigned toNone=>erk
    Tue 13 May 2008 11:52:32 AM UTCchehrlicAttached File-=>Added certi.patch, #15659

    Back to the top


    Powered by Savane 3.1-cleanup1