[Ns-bugs] [Bug 1358] New: PacketMetadata::~PacketMetadata() writes in freed memory
code at nsnam.ece.gatech.edu
Sun Feb 5 10:15:50 PST 2012
Summary: PacketMetadata::~PacketMetadata() writes in freed
AssignedTo: ns-bugs at isi.edu
ReportedBy: nbaldo at cttc.es
Estimated Hours: 0.0
Created attachment 1327
valgrind error log
I am experiencing corrupted memory errors in a program when executed with
around 90000 nodes or more. The symptoms (which vary a bit depending on the
exact number of nodes) are sementation faults or failed assertions in malloc.c,
which point to a memory corruption problem. With smaller number of nodes, the
problem is not evident.
I've traced the problem to a write operation in a block of already freed memory
performed by PacketMetadata::~PacketMetadata(). Please have a look at the
attached valgrind log.
I've been able to reproduce this bug only with the LENA code, in particular the
attached log was produced with changeset 7542c79c9d19 which is available at
Note that this code is pretty much up-to-date with respect to ns-3-dev (the
last merged changeset is 90904c14135f of January 29, 2012)
Here is the command line used to reproduce the error:
./waf --run lena-rem-sector-antenna --command="%s
I have a very poor understanding of the inner working of the fancy memory
management solution of PacketMetadata, hence any suggestion to get to a fix
would be very much appreciated.
Configure bugmail: https://www.nsnam.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the Ns-bugs