Skip to content

Conversation

github-actions[bot]
Copy link
Contributor

@github-actions github-actions bot commented Aug 30, 2021

Backport of #58215 to release/6.0

/cc @lambdageek

Customer Impact

  1. User programs on ios devices that use System.Text.Json to serialize large structs will crash.
  2. Incorrect unsafe methods that return null from a ref-return method will crash instead of throwing a NullReferenceException.

Testing

CI and manual testing

Risk

Low. For (1) all the logic in the runtime is the same, we just dynamically allocate a big enough buffer. For (2) we already do the right thing when using LLVM AOT - this is just fixing up the non-LLVM AOT case.

If the return type is a struct that's bigger than our buffer, malloc a
buffer for it instead of using a fixed-size stack buffer
Fixes various tests in InvokeRefReturnNetcoreTests
@akoeplinger akoeplinger merged commit 9c8962e into release/6.0 Sep 1, 2021
@akoeplinger akoeplinger deleted the backport/pr-58215-to-release/6.0 branch September 1, 2021 10:16
@ghost ghost locked as resolved and limited conversation to collaborators Oct 1, 2021
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.

3 participants