[Ns-bugs] [Bug 1208] Spectrum module example causing valgrind errors

code@nsnam.ece.gatech.edu code at nsnam.ece.gatech.edu
Wed Jul 6 09:55:17 PDT 2011


https://www.nsnam.org/bugzilla/show_bug.cgi?id=1208

--- Comment #2 from Nicola Baldo <nbaldo at cttc.es> 2011-07-06 12:55:17 EDT ---
I have to confess that I don't have a clue, I get things like:

==7004== Conditional jump or move depends on uninitialised value(s)
==7004==    at 0x40C23BF: ns3::HalfDuplexIdealPhy::EndRx()
(half-duplex-ideal-phy.cc:397)

which corresponds to:

  bool rxOk = m_interference.EndRx ();

  if (rxOk)


or another example:

==7004== Conditional jump or move depends on uninitialised value(s)
==7004==    at 0x4094AD2:
ns3::MultiModelSpectrumChannel::StartTx(ns3::Ptr<ns3::PacketBurst>,
ns3::Ptr<ns3::SpectrumValue>, ns3::SpectrumType, ns3::Time, ns3::Ptr<ns
3::SpectrumPhy>) (multi-model-spectrum-channel.cc:278)

which corresponds to:

   double gainDb = m_propagationLoss->CalcRxPower (0, txMobility,
receiverMobility);
   if ( (-gainDb) > m_maxLossDb)

and I am sure valgrind is complaining about "gainDb", because the error
persists if I change the if statement to

   if (gainDb > 0)


Any suggestion? Am I missing something?

-- 
Configure bugmail: https://www.nsnam.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


More information about the Ns-bugs mailing list