Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[runtime] copy updated byref nullables after invoke (#67652)
* [runtime] copy updated byref nullables after invoke Bring back some code lost in #60270 When a `null` is passed for a `ref Nullable<S>` argument to a runtime invoke, the invoke wrapper creates a default `Nullable` that should be copied back into the original arguments array of the invoke. There is code in the managed `Invoke` method to do some of the copying from the temporary array that is created for the Invoke (we pass a `Span<object>` over that array from managed to native), but in `mono_runtime_try_invoke_span` we create a C array `pa` that has the arguments (this takes care of by-value semantics for value types, for example). We need to copy the byref nullables back from `pa` to the span, so that managed code can then copy it back from the span to the original input array of the Invoke. Fixes #67269
- Loading branch information