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

Remove kDivideByZeroException from jithelpers #109488

Closed
wants to merge 3 commits into from
Closed

Conversation

am11
Copy link
Member

@am11 am11 commented Nov 3, 2024

Testing a theory that explicit checks may not be necessary since some of these are actually under Is32BitSigned(divisor) condition and their (logical) else blocks are relying on hardware exception which anyways maps to the DBZ exception?

@dotnet-policy-service dotnet-policy-service bot added the community-contribution Indicates that the PR has been added by a community member label Nov 3, 2024
@am11
Copy link
Member Author

am11 commented Nov 3, 2024

It ran into assertion:

Assert failure(PID 1764 [0x000006e4], Thread: 4616 [0x1208]): CONTRACT VIOLATION by CreateCOMPlusExceptionObject at "D:\a\_work\1\s\src\coreclr\vm\excep.cpp":5725

GC_TRIGGERS encountered in a GC_NOTRIGGER scope

                        CONTRACT in CreateCOMPlusExceptionObject at "D:\a\_work\1\s\src\coreclr\vm\excep.cpp":5725
                        CONTRACT in DispatchCallSimple at "D:\a\_work\1\s\src\coreclr\vm\callhelpers.cpp":205
                        CONTRACT in KickOffThread_Worker at "D:\a\_work\1\s\src\coreclr\vm\comsynchronizable.cpp":131
                        CONTRACT in ManagedThreadBase_DispatchInner at "D:\a\_work\1\s\src\coreclr\vm\threads.cpp":7033
                        CONTRACT in ManagedThreadBase_Dispatch at "D:\a\_work\1\s\src\coreclr\vm\threads.cpp":7278
                        CONTRACT in KickOffThread at "D:\a\_work\1\s\src\coreclr\vm\comsynchronizable.cpp":176

I expected the runtime to handle hardware exceptions (divide-by-zero 0 and overflow 4) and map to managed exceptions on Windows x86, without the JIT modifications. (linux-arm can utilize the extra frame approach from #109087)

@am11 am11 closed this Nov 3, 2024
@am11 am11 deleted the patch-20 branch November 3, 2024 20:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-VM-coreclr community-contribution Indicates that the PR has been added by a community member
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant