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

[mono][jit] Emit a null check when storing to valuetype fields. #82663

Merged
merged 3 commits into from
Apr 29, 2023

Conversation

vargaz
Copy link
Contributor

@vargaz vargaz commented Feb 25, 2023

Fixes #82535.

@vargaz
Copy link
Contributor Author

vargaz commented Feb 27, 2023

Still needs a regression test.

@vargaz
Copy link
Contributor Author

vargaz commented Mar 1, 2023

The new test seems to crash on the clr ?

   JIT/Regression/JitBlue/Runtime_82535/Runtime_82535/Runtime_82535.sh [FAIL]
      [createdump] Invalid process id: task_for_pid(4941) FAILED (os/kern) failure (5)
      [createdump] This failure may be because createdump or the application is not properly signed and entitled.
      [createdump] Failure took 0ms
      [createdump] waitpid() returned successfully (wstatus 0000ff00)
      /private/tmp/helix/working/B0370906/w/B5A80970/e/JIT/Regression/JitBlue/Runtime_82535/Runtime_82535/Runtime_82535.sh: line 425:  4941 Segmentation fault: 11  (core dumped) $LAUNCHER $ExePath "${CLRTestExecutionArguments[@]}"

@lambdageek
Copy link
Member

lambdageek commented Mar 3, 2023

@mangod9
Copy link
Member

mangod9 commented Mar 4, 2023

Is this a consistent failure on linux x64 Debug builds? Adding @janvorli since we had fixed something similar in 7.

@lewing lewing added the area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI label Mar 5, 2023
@ghost
Copy link

ghost commented Mar 5, 2023

Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch, @kunalspathak
See info in area-owners.md if you want to be subscribed.

Issue Details

Fixes #82535.

Author: vargaz
Assignees: vargaz
Labels:

area-CodeGen-coreclr, area-Codegen-JIT-mono

Milestone: -

@lewing lewing closed this Mar 10, 2023
@lewing lewing reopened this Mar 10, 2023
@marek-safar marek-safar removed the area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI label Mar 27, 2023
@vargaz vargaz force-pushed the store_membase_null_check branch from 72080c6 to 03f8a97 Compare March 28, 2023 15:22
@vargaz
Copy link
Contributor Author

vargaz commented Apr 10, 2023

/azp run runtime

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@vargaz vargaz force-pushed the store_membase_null_check branch from bba19c0 to e9adfde Compare April 28, 2023 19:06
@vargaz vargaz force-pushed the store_membase_null_check branch from e9adfde to 917feae Compare April 28, 2023 22:37
@vargaz vargaz merged commit 6bb5449 into dotnet:main Apr 29, 2023
@vargaz vargaz deleted the store_membase_null_check branch April 29, 2023 04:23
@@ -66,6 +66,9 @@
<ExcludeList Include="$(XunitTestBinBase)/GC/Regressions/Github/Runtime_76219/Runtime_76219/*">
<Issue>https://github.com/dotnet/runtime/issues/78899</Issue>
</ExcludeList>
<ExcludeList Include="$(XunitTestBinBase)/JIT/Regression/JitBlue/Runtime_82535/*">
<Issue>https://github.com/dotnet/runtime/pull/82663</Issue>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a tracking issue for the CoreCLR problem with this test? We don't typically put pull requests into the Issue field because Mono pull requests are not CoreCLR tracking issues that someone would look at.

Cc @mangod9 @janvorli @dotnet/jit-contrib

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will make one.

<PropertyGroup>
<OutputType>Exe</OutputType>
<Optimize>True</Optimize>
<RequiresProcessIsolation>true</RequiresProcessIsolation>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why does this require process isolation? RequiresProcessIsolation adds extra costs that the JIT team is actively working on reducing right now. Throwing and catching a nullref doesn't sounds like something that would need it.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It caused a process crash on CI, which doesn't seem to happen any more.

vargaz added a commit to vargaz/runtime that referenced this pull request May 1, 2023
@vargaz
Copy link
Contributor Author

vargaz commented May 1, 2023

#85606

@ghost ghost locked as resolved and limited conversation to collaborators May 31, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Mono: Crash when accessing a field of a null class object
6 participants