Skip to content

Commit

Permalink
[mono][tests] Throw InvalidProgramException when ENDFILTER has invali…
Browse files Browse the repository at this point in the history
…d value type or invalid number of values (#79394)

* Throw InvalidProgramException when ENDFILTER has invalid value type or invalid number of values
  • Loading branch information
kotlarmilos authored Dec 9, 2022
1 parent 8199d0a commit 9333e46
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
8 changes: 7 additions & 1 deletion src/mono/mono/mini/interp/transform.c
Original file line number Diff line number Diff line change
Expand Up @@ -7577,8 +7577,14 @@ generate_code (TransformData *td, MonoMethod *method, MonoMethodHeader *header,
case CEE_UNUSED57: ves_abort(); break;
#endif
case CEE_ENDFILTER:
td->sp--;
if (td->sp != td->stack || td->sp [0].type != STACK_TYPE_I4) {
mono_error_set_generic_error (error, "System", "InvalidProgramException", "");
goto exit;
}

interp_add_ins (td, MINT_ENDFILTER);
interp_ins_set_sreg (td->last_ins, td->sp [-1].local);
interp_ins_set_sreg (td->last_ins, td->sp [0].local);
++td->ip;
link_bblocks = FALSE;
break;
Expand Down
6 changes: 0 additions & 6 deletions src/tests/issues.targets
Original file line number Diff line number Diff line change
Expand Up @@ -2567,12 +2567,6 @@
<ExcludeList Include = "$(XunitTestBinBase)/JIT/Regression/CLR-x86-JIT/V1-M11-Beta1/b39946/b39946/**">
<Issue>https://github.com/dotnet/runtime/issues/54393</Issue>
</ExcludeList>
<ExcludeList Include = "$(XunitTestBinBase)/baseservices/varargs/varargsupport/**">
<Issue>https://github.com/dotnet/runtime/issues/54401</Issue>
</ExcludeList>
<ExcludeList Include = "$(XunitTestBinBase)/baseservices/varargs/varargsupport_r/**">
<Issue>https://github.com/dotnet/runtime/issues/54401</Issue>
</ExcludeList>
<ExcludeList Include = "$(XunitTestBinBase)/JIT/Regression/VS-ia64-JIT/M00/b109878/b109878/**">
<Issue>https://github.com/dotnet/runtime/issues/54392</Issue>
</ExcludeList>
Expand Down

0 comments on commit 9333e46

Please sign in to comment.