projects
/
platform
/
upstream
/
dotnet
/
runtime.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6619e1b
)
[mono][interp] Properly initialize fields of LocalValue (#80795)
author
Vlad Brezae
<brezaevlad@gmail.com>
Thu, 19 Jan 2023 09:11:42 +0000
(11:11 +0200)
committer
GitHub
<noreply@github.com>
Thu, 19 Jan 2023 09:11:42 +0000
(11:11 +0200)
We were storing uninitialized values. Bug caught with valgrind, hopefully fixes some real crashes.
src/mono/mono/mini/interp/transform.c
patch
|
blob
|
history
diff --git
a/src/mono/mono/mini/interp/transform.c
b/src/mono/mono/mini/interp/transform.c
index
4cdcd53
..
3ffe7a9
100644
(file)
--- a/
src/mono/mono/mini/interp/transform.c
+++ b/
src/mono/mono/mini/interp/transform.c
@@
-8801,6
+8801,8
@@
interp_fold_unop (TransformData *td, LocalValue *local_defs, InterpInst *ins)
}
local_ref_count [sreg]--;
+ result.ins = ins;
+ result.ref_count = 0;
local_defs [dreg] = result;
return ins;
@@
-8978,6
+8980,8
@@
interp_fold_binop (TransformData *td, LocalValue *local_defs, InterpInst *ins, g
local_ref_count [sreg1]--;
local_ref_count [sreg2]--;
+ result.ins = ins;
+ result.ref_count = 0;
local_defs [dreg] = result;
return ins;
}