JIT: some jumps based on uninitialized values detected by valgrind #46961
Labels
area-CodeGen-coreclr
CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI
Milestone
From @tmds, #46905
I ran valgrind on dotnet hello world, and it pointed out a few jumps based on uninitialized values.
LinearScan::buildIntervals() (src/coreclr/jit/lsrabuild.cpp:2320)
runtime/src/coreclr/jit/lsrabuild.cpp
Line 2320 in b95de55
It looks like
firstColdLoc
is only initialized in DEBUG. Probably it should be also set toMaxLocation
in release?runtime/src/coreclr/jit/lsra.cpp
Lines 719 to 721 in b95de55
FindConstReturnBlock (src/coreclr/jit/flowgraph.cpp:9189)
runtime/src/coreclr/jit/flowgraph.cpp
Line 9189 in b95de55
returnConstants[i]
is not initialized. I don't know what the best place is to initialize it.CodeGen::instGen(instruction) (src/coreclr/jit/instr.cpp:200)
runtime/src/coreclr/jit/instr.cpp
Line 200 in 36d132e
emitNextNop
initialization is tied toPSEUDORANDOM_NOP_INSERTION
, so this check should probably#ifdef PSEUDORANDOM_NOP_INSERTION
?The text was updated successfully, but these errors were encountered: