[5.9] ARCSequenceOpts: fix a wrong handling of applies with indirect out arguments #66221 #66265
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Explanation: This is a fix for a bug in the ARC analysis which is in the compiler since 2015. It caused a miscompile because the analysis for function arguments was wrong. The bug probably only showed up since the underlying alias analysis was rewritten and got more precise several month ago.
Scope: It can affect functions with indirect results
Issue: rdar://109920867, Runtime error (
EXC_BAD_ACCESS
) when performing certain Postgres operations via PostgresNIO. #64921Risk: Low. It's a one line change which is very well understood. It's correcting the index into a function call's argument array.
Testing: With a regression test
Reviewer: @atrick
Main branch PR: ARCSequenceOpts: fix a wrong handling of applies with indirect out arguments #66221 (and tests: Disable some tests in assemblyvision_remark/cast_remarks_objc.swift #66239 for a test change)