-
Notifications
You must be signed in to change notification settings - Fork 4.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
some jumps based on uninitialized values detected by valgrind #46905
Comments
I couldn't figure out the best area label to add to this issue. If you have write-permissions please help me learn by adding exactly one area label. |
cc: @dotnet/jit-contrib for the JIT code. |
@tmds thank you for reporting these! |
|
From stepping through gdb it looks like
|
Maybe I didn't understand the issue then. I have thought valgrind was complaining that the pvPublicKeyToken is not initialized in some code paths. What was the exact complaint? |
I think what |
It can also be a false positive. |
I edited/split this issue and moved the JIT portion to #46961 |
I've added a 5th and 6th bullet. |
I ran valgrind on dotnet hello world, and it pointed out a few jumps based on uninitialized values.
moved to JIT: some jumps based on uninitialized values detected by valgrind #46961
moved to JIT: some jumps based on uninitialized values detected by valgrind #46961
BINDER_SPACE::AssemblyName::Init(IMDInternalImport*, _tagPEKIND, unsigned int, int) (src/coreclr/binder/assemblyname.cpp:144)
runtime/src/coreclr/binder/assemblyname.cpp
Line 144 in 36d132e
valgrind is not happy about
pvPublicKeyToken
, butdwPublicKeyToken
is0
in those cases sopvPublicKeyToken
is not used beyond the check. MaybepvPublicKeyToken
can be set toNULL
inGetAssemblyRefProps
, or we can swap the order in theif
to make valgrind happy?moved to JIT: some jumps based on uninitialized values detected by valgrind #46961
==6406== at 0x563D079: PAL_VirtualUnwind (src/coreclr/pal/src/exception/seh-unwind.cpp:353) ==6406== by 0x545253E: LazyMachState::unwindLazyState(LazyMachState*, MachState*, unsigned int, int, HostCallPreference) (src/coreclr/vm/amd64/gmsamd64.cpp:63)
runtime/src/coreclr/pal/src/exception/seh-unwind.cpp
Line 353 in a1c4028
ContextFlags
is not initialized.The context is a local at:
runtime/src/coreclr/vm/amd64/gmsamd64.cpp
Line 25 in a1c4028
==6406== by 0x5670B1D: FreeSignalAlternateStack (src/coreclr/pal/src/thread/thread.cpp:2603)
runtime/src/coreclr/pal/src/thread/thread.cpp
Lines 2597 to 2603 in a1c4028
valgrind doesn't likes we're passing an uninitialized bytes to
sigaltstack
.It is a false positive since that field is ignored when using SS_DISABLE.
We can probably make this warning go away by setting
ss_sp
toNULL
.@janvorli @jkotas can you take a look, or cc someone that can?
The text was updated successfully, but these errors were encountered: