Bug 420 - static-speed-helper
static-speed-helper
Status: RESOLVED FIXED
Product: ns-3
Classification: Unclassified
Component: helpers
ns-3-dev
All All
: P1 normal
Assigned To: ns-bugs
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2008-11-25 23:03 UTC by Craig Dowell
Modified: 2008-11-26 06:43 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Craig Dowell 2008-11-25 23:03:17 UTC
Valgrind says that m_paused in static-speed-helper.cc is uninitialized at line 70.  This appears to be the case since there are two of three constructors that do not initialize it.
Comment 1 Mathieu Lacage 2008-11-26 04:30:47 UTC
It would be nice to see the full valgrind warning.
Comment 2 Mathieu Lacage 2008-11-26 06:41:04 UTC
==24061== Conditional jump or move depends on uninitialised value(s)
==24061==    at 0x542F44E: ns3::StaticSpeedHelper::Update() const (static-speed-helper.cc:70)
==24061==    by 0x5433889: ns3::RandomWalk2dMobilityModel::Start() (random-walk-2d-mobility-model.cc:83)
==24061==    by 0x5432B0F: ns3::EventImpl* ns3::MakeEvent<void (ns3::RandomWalk2dMobilityModel::*)(), ns3::RandomWalk2dMobilityModel*>(void (ns3::RandomWalk2dMobilityModel::*)(), ns3::RandomWalk2dMobilityModel*)::EventMemberImpl0::Notify() (make-event.h:88)
==24061==    by 0x52396FA: ns3::EventImpl::Invoke() (event-impl.cc:39)
==24061==    by 0x5252488: ns3::DefaultSimulatorImpl::ProcessOneEvent() (default-simulator-impl.cc:121)
==24061==    by 0x52524C9: ns3::DefaultSimulatorImpl::Run() (default-simulator-impl.cc:152)
==24061==    by 0x5242118: ns3::Simulator::Run() (simulator.cc:151)
==24061==    by 0x40EC95: main (wifi-wired-bridging.cc:150)
Comment 3 Mathieu Lacage 2008-11-26 06:43:51 UTC
I reviewed the code carefully and I believe that this fix is safe because all users of the StaticSpeedHelper code invoke the Unpause method correctly. We need more regression tests for mobility models :/

changeset 29bb5689faa4