Skip to content
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

Fix test under JIT stress #110538

Merged
merged 1 commit into from
Dec 10, 2024

Conversation

AaronRobinsonMSFT
Copy link
Member

@AaronRobinsonMSFT AaronRobinsonMSFT commented Dec 9, 2024

Fixes #110511

The needed validation here is the appropriate exception message is present and the generated frame, InvokeStub_TestClassThatThrows, isn't present.

Under DOTNET_JitStress=1, the stacks are now different:

No DOTNET_ variables set

BEGIN VerifyInvokeIsUsingInterpreter_Method
System.Exception: Here
   at System.Reflection.Tests.InvokeInterpretedTests.TestClassThatThrows.Throw() in E:\runtime\src\libraries\Common\tests\System\Reflection\InvokeInterpretedTests.cs:line 43
   at System.RuntimeMethodHandle.InvokeMethod(ObjectHandleOnStack target, Void** arguments, ObjectHandleOnStack sig, BOOL isConstructor, ObjectHandleOnStack result)
   at System.Reflection.MethodBaseInvoker.InterpretedInvoke_Method(Object obj, IntPtr* args) in E:\runtime\src\coreclr\System.Private.CoreLib\src\System\Reflection\MethodBaseInvoker.CoreCLR.cs:line 36
   at System.Reflection.MethodBaseInvoker.InvokeWithNoArgs(Object obj, BindingFlags invokeAttr) in E:\runtime\src\libraries\System.Private.CoreLib\src\System\Reflection\MethodBaseInvoker.cs:line 57
END VerifyInvokeIsUsingInterpreter_Method

BEGIN VerifyInvokeIsUsingInterpreter_Constructor
System.Exception: Here
   at System.Reflection.Tests.InvokeInterpretedTests.TestClassThatThrows..ctor() in E:\runtime\src\libraries\Common\tests\System\Reflection\InvokeInterpretedTests.cs:line 40
   at System.Reflection.MethodBaseInvoker.InterpretedInvoke_Constructor(Object obj, IntPtr* args) in E:\runtime\src\coreclr\System.Private.CoreLib\src\System\Reflection\MethodBaseInvoker.CoreCLR.cs:line 33
   at System.Reflection.MethodBaseInvoker.InvokeWithNoArgs(Object obj, BindingFlags invokeAttr) in E:\runtime\src\libraries\System.Private.CoreLib\src\System\Reflection\MethodBaseInvoker.cs:line 57
END VerifyInvokeIsUsingInterpreter_Constructor

Set DOTNET_JitStress=1

BEGIN VerifyInvokeIsUsingInterpreter_Method
System.Exception: Here
   at System.Reflection.Tests.InvokeInterpretedTests.TestClassThatThrows.Throw() in E:\runtime\src\libraries\Common\tests\System\Reflection\InvokeInterpretedTests.cs:line 43
   at System.RuntimeMethodHandle.InvokeMethod(ObjectHandleOnStack target, Void** arguments, ObjectHandleOnStack sig, BOOL isConstructor, ObjectHandleOnStack result)
   at System.RuntimeMethodHandle.InvokeMethod(Object target, Void** arguments, Signature sig, Boolean isConstructor) in E:\runtime\src\coreclr\System.Private.CoreLib\src\System\RuntimeHandles.cs:line 1094
   at System.Reflection.MethodBaseInvoker.InvokeWithNoArgs(Object obj, BindingFlags invokeAttr) in E:\runtime\src\libraries\System.Private.CoreLib\src\System\Reflection\MethodBaseInvoker.cs:line 57
END VerifyInvokeIsUsingInterpreter_Method

BEGIN VerifyInvokeIsUsingInterpreter_Constructor
System.Exception: Here
   at System.Reflection.Tests.InvokeInterpretedTests.TestClassThatThrows..ctor() in E:\runtime\src\libraries\Common\tests\System\Reflection\InvokeInterpretedTests.cs:line 40
   at System.Reflection.MethodBaseInvoker.InterpretedInvoke_Constructor(Object obj, IntPtr* args) in E:\runtime\src\coreclr\System.Private.CoreLib\src\System\Reflection\MethodBaseInvoker.CoreCLR.cs:line 33
   at System.Reflection.MethodBaseInvoker.InvokeWithNoArgs(Object obj, BindingFlags invokeAttr) in E:\runtime\src\libraries\System.Private.CoreLib\src\System\Reflection\MethodBaseInvoker.cs:line 57
END VerifyInvokeIsUsingInterpreter_Constructor

@AaronRobinsonMSFT
Copy link
Member Author

/ba-g macOS timeout issue - dotnet/dnceng#1883

@AaronRobinsonMSFT AaronRobinsonMSFT merged commit 7f9dab9 into dotnet:main Dec 10, 2024
81 of 83 checks passed
@AaronRobinsonMSFT AaronRobinsonMSFT deleted the runtime_110511 branch December 10, 2024 01:18
hez2010 pushed a commit to hez2010/runtime that referenced this pull request Dec 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-System.Reflection test-bug Problem in test source code (most likely)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Test failure: System.Reflection.Tests.InvokeInterpretedTests.VerifyInvokeIsUsingInterpreter_Method
2 participants