Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/dotnet/runtime.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKevin Gosse <krix33@gmail.com>2020-10-23 12:42:37 +0300
committerGitHub <noreply@github.com>2020-10-23 12:42:37 +0300
commite82f4af06623fb489e2a55b10e16c5fb20d373cb (patch)
tree0b69e893b7bf4c9c2298635d2dff2642a702113e /src/tests/profiler/native
parentff9eb78a3042f38a93b7e8792679f92879e4f0cc (diff)
Add missing opcodes to k_rgnStackPushes (#42246)
The rewriter defined two extra opcodes, CEE_COUNT and CEE_SWITCH_ARG, but does not define them in the k_rgnStackPushes array. This can cause out-of-bounds reads when computing the value of maxstack.
Diffstat (limited to 'src/tests/profiler/native')
-rw-r--r--src/tests/profiler/native/rejitprofiler/ilrewriter.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/tests/profiler/native/rejitprofiler/ilrewriter.h b/src/tests/profiler/native/rejitprofiler/ilrewriter.h
index c58dfaee83b..e89fe07f2ef 100644
--- a/src/tests/profiler/native/rejitprofiler/ilrewriter.h
+++ b/src/tests/profiler/native/rejitprofiler/ilrewriter.h
@@ -153,6 +153,8 @@ static int k_rgnStackPushes[] = {
#undef PushRef
#undef VarPush
#undef OPDEF
+ 0, // CEE_COUNT
+ 0 // CEE_SWITCH_ARG
};