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

[release/8.0] [mono] Disallow casts of bounded arrays to array special interfaces #93617

Merged
merged 4 commits into from
Oct 18, 2023

Conversation

github-actions[bot]
Copy link
Contributor

@github-actions github-actions bot commented Oct 17, 2023

Backport of #93616 to release/8.0

/cc @lambdageek

Customer Impact

Customers on mobile and WebAssembly platforms using bounded array types may experience crashes if the arrays are incorrectly cast to certain generic interface types. The correct behavior is to throw an InvalidCastException. This may impact customers using certain versions of xUnit for testing their mobile or WASM applications.

Testing

New CI test

Risk

Low

@lewing lewing added the Servicing-consider Issue for next servicing release review label Oct 17, 2023
@lewing lewing added this to the 8.0.0 milestone Oct 17, 2023
@MichalStrehovsky
Copy link
Member

The test needs to be disabled on Native AOT. We don't support arrays with non-zero lower bounds.

@MichalStrehovsky
Copy link
Member

The test needs to be disabled on Native AOT. We don't support arrays with non-zero lower bounds.

Should be added to the collection here:

<!-- Arrays with non-zero lower bounds -->
<!-- https://github.com/dotnet/runtimelab/issues/155 -->
<ExcludeList Include="$(XunitTestBinBase)/JIT/Methodical\Arrays\huge\huge_b_r\*" />
<ExcludeList Include="$(XunitTestBinBase)/JIT/Methodical\Arrays\huge\huge_i4_r\*" />
<ExcludeList Include="$(XunitTestBinBase)/JIT/Methodical\Arrays\huge\huge_objref_r\*" />
<ExcludeList Include="$(XunitTestBinBase)/JIT/Methodical\Arrays\huge\huge_r4_r\*" />
<ExcludeList Include="$(XunitTestBinBase)/JIT/Methodical\Arrays\huge\huge_r8_r\*" />
<ExcludeList Include="$(XunitTestBinBase)/JIT/Methodical\Arrays\huge\huge_struct_r\*" />
<ExcludeList Include="$(XunitTestBinBase)/JIT/Methodical\Arrays\huge\huge_u8_r\*" />
<ExcludeList Include="$(XunitTestBinBase)/JIT/Methodical\Arrays\misc\address_d\*" />
<ExcludeList Include="$(XunitTestBinBase)/JIT/Methodical\Arrays\misc\ldelem_get_d\*" />
<ExcludeList Include="$(XunitTestBinBase)/JIT/Methodical\Arrays\misc\address_r\*" />
<ExcludeList Include="$(XunitTestBinBase)/JIT/Methodical\Arrays\misc\gcarr_il_r\*" />
<ExcludeList Include="$(XunitTestBinBase)/JIT/Methodical\Arrays\misc\ldelem_get_r\*" />
<ExcludeList Include="$(XunitTestBinBase)/JIT/Methodical\Arrays\range\float64_range1_d\*" />
<ExcludeList Include="$(XunitTestBinBase)/JIT/Methodical\Arrays\range\float64_range2_d\*" />
<ExcludeList Include="$(XunitTestBinBase)/JIT/Methodical\Arrays\range\int32_1_d\*" />
<ExcludeList Include="$(XunitTestBinBase)/JIT/Methodical\Arrays\range\int32_m1_d\*" />
<ExcludeList Include="$(XunitTestBinBase)/JIT/Methodical\Arrays\range\int32_neg_range_d\*" />
<ExcludeList Include="$(XunitTestBinBase)/JIT/Methodical\Arrays\range\int32_range1_d\*" />
<ExcludeList Include="$(XunitTestBinBase)/JIT/Methodical\Arrays\range\int32_range2_d\*" />
<ExcludeList Include="$(XunitTestBinBase)/JIT/Methodical\Arrays\range\float64_range1_r\*" />
<ExcludeList Include="$(XunitTestBinBase)/JIT/Methodical\Arrays\range\float64_range2_r\*" />
<ExcludeList Include="$(XunitTestBinBase)/JIT/Methodical\Arrays\range\int32_1_r\*" />
<ExcludeList Include="$(XunitTestBinBase)/JIT/Methodical\Arrays\range\int32_m1_r\*" />
<ExcludeList Include="$(XunitTestBinBase)/JIT/Methodical\Arrays\range\int32_neg_range_r\*" />
<ExcludeList Include="$(XunitTestBinBase)/JIT/Methodical\Arrays\range\int32_range1_r\*" />
<ExcludeList Include="$(XunitTestBinBase)/JIT/Methodical\Arrays\range\int32_range2_r\*" />
<ExcludeList Include="$(XunitTestBinBase)/JIT/Methodical\int64\arrays\hugedim_r\*" />
<ExcludeList Include="$(XunitTestBinBase)/JIT/Methodical\refany\array2_d\*" />
<ExcludeList Include="$(XunitTestBinBase)/JIT/Methodical\refany\array3_d\*" />
<ExcludeList Include="$(XunitTestBinBase)/JIT/Methodical\refany\array3_r\*" />
<ExcludeList Include="$(XunitTestBinBase)/JIT/Methodical\tailcall\deep_array_nz_d\*" />
<ExcludeList Include="$(XunitTestBinBase)/JIT/Methodical\tailcall\deep_array_nz_r\*" />
<ExcludeList Include="$(XunitTestBinBase)/JIT/Methodical\VT\port\huge_gcref_d\*" />
<ExcludeList Include="$(XunitTestBinBase)/JIT/Methodical\VT\port\huge_gcref_r\*" />
<ExcludeList Include="$(XunitTestBinBase)/JIT/Performance/CodeQuality/Benchstones/MDBenchI/MDGeneralArray/MDGeneralArray/*" />

@carlossanlop
Copy link
Member

@MichalStrehovsky @lambdageek is there an additional test that needs to be disabled? There's a failure:

Unhandled Exception: System.PlatformNotSupportedException: Arrays with non-zero lower bounds are not supported.

@lambdageek
Copy link
Member

@MichalStrehovsky @lambdageek is there an additional test that needs to be disabled? There's a failure:

Unhandled Exception: System.PlatformNotSupportedException: Arrays with non-zero lower bounds are not supported.

That's the test I tried to exclude. But I think I messed up the exclude target

@lambdageek
Copy link
Member

Approved by tactics in email

@carlossanlop
Copy link
Member

CI failure unrelated (KnownBuildError didn't tag it automatically): #90639

@carlossanlop carlossanlop merged commit fbd28cb into release/8.0 Oct 18, 2023
157 of 162 checks passed
@carlossanlop carlossanlop deleted the backport/pr-93616-to-release/8.0 branch October 18, 2023 23:54
@ghost ghost locked as resolved and limited conversation to collaborators Nov 18, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-VM-meta-mono Servicing-approved Approved for servicing release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants