Fix ThrowAndRethrowOtherMethod test.
authorEugene Rozenfeld <erozen@microsoft.com>
Thu, 17 Jan 2019 21:11:46 +0000 (13:11 -0800)
committerEugene Rozenfeld <erozen@microsoft.com>
Thu, 17 Jan 2019 21:11:46 +0000 (13:11 -0800)
commit53e3292fbeb69c7428033c0554c931b207200c7e
tree79ec6dafbe675596e81d41c23cc2f18c3384b50b
parent7f4bd78499129edc43542734275d4ccf766a4bae
Fix ThrowAndRethrowOtherMethod test.

ThrowAndRethrowOtherMethod is sensitive to jit inlining decisions.
In particular, it fails if the jit decides to inline ThrowException.
That can happen with, e.g., random inlining policy.
In that case the stack trace doesn't have frame info for ThrowException
and VerifyCallStack skips the wrong frame.
One of the jit stress legs is failing because of that:
https://github.com/dotnet/coreclr/issues/21644 .
The fix is to ensure that ThrowException is not inlined.

Commit migrated from https://github.com/dotnet/corefx/commit/165e71266f79025209f293dd26d755a1c268f40c
src/libraries/System.Runtime/tests/System/ExceptionTests.cs