On Mon, 16 Jul 2012, Andreas Hansson wrote:

More info from valgrind for the x86 linux boot:

==12647== Conditional jump or move depends on uninitialised value(s) ==12647== at 0x430399: X86ISA::RegOpBase::genFlags(unsigned long, unsigned long, unsigned long, unsigned long, unsigned long, bool) const (microregop.cc:73) ==12647== by 0x93118D: X86ISAInst::SubFlagsBig::execute(TimingSimpleCPU*, Trace::InstRecord*) const (timing_simple_cpu_exec.cc:3807) ==12647== by 0xE904DE: TimingSimpleCPU::completeIfetch(Packet*) (timing.cc:685)

Plus plenty more of these on similar lines in microregop.cc.

Any clues (for those who know that part of the codebase)?


I ran Valgrind with track-origins set to yes. The output is similar to what Andreas got, the only addition being that the uninitialised value is being created in the function CPUID::execute(). I can see that the result variable in that function is not initialised, and that it is possible that the doCpuid() function in file src/arch/x86/cpuid.cc returns this uninitialised value. It seems we need an else condition at the end of the function.


==27145==
==27145== Conditional jump or move depends on uninitialised value(s)
==27145==    at 0xACB026: X86ISA::RegOpBase::genFlags(unsigned long,
unsigned long, unsigned long, unsigned long, unsigned long, bool) const
(microregop.cc:75)
==27145==    by 0xFB25CA:
X86ISAInst::SubFlagsBig::execute(TimingSimpleCPU*, Trace::InstRecord*)
const (timing_simple_cpu_exec.cc:3807)
==27145==    by 0x615A17: TimingSimpleCPU::completeIfetch(Packet*)
(timing.cc:685)
==27145==    by 0x6137B1: TimingSimpleCPU::fetch() (timing.cc:566)
==27145==    by 0x6150E0:
TimingSimpleCPU::advanceInst(RefCountingPtr<FaultBase>) (timing.cc:629)
==27145==    by 0x615B98: TimingSimpleCPU::completeIfetch(Packet*)
(timing.cc:700)
==27145==    by 0x616234:
TimingSimpleCPU::IcachePort::recvTimingResp(Packet*) (timing.cc:726)
==27145==    by 0x6FC0D6: SlavePort::sendTimingResp(Packet*) (port.cc:215)
==27145==    by 0x6FD090: SlavePacketQueue::sendTiming(Packet*, bool)
(packet_queue.cc:235)
==27145==    by 0x6FCD09: PacketQueue::trySendTiming()
(packet_queue.cc:147)
==27145==    by 0x6FCE8F: PacketQueue::sendDeferredPacket()
(packet_queue.cc:183)
==27145==    by 0x6FCEFB: PacketQueue::processSendEvent()
(packet_queue.cc:196)
==27145==  Uninitialised value was created by a stack allocation
==27145==    at 0x1008DBE: X86ISAInst::CPUID::execute(TimingSimpleCPU*,
Trace::InstRecord*) const (timing_simple_cpu_exec.cc:20864)

--
Nilay
_______________________________________________
gem5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/gem5-dev

Reply via email to