Skip to content

Conversation

jamieQ
Copy link
Contributor

@jamieQ jamieQ commented May 22, 2023

Issue

  • under some circumstances, the action application observation codepath could trigger runtime memory exclusivity exceptions

Description

  • added a test case that reproduces the issue with the existing API
  • removed an unneeded inout parameter to resolve the problem

Checklist

  • Unit Tests
  • UI Tests (N/A)
  • Snapshot Tests (iOS only) (N/A)
  • I have made corresponding changes to the documentation (N/A)

@jamieQ jamieQ changed the title [fix]: resolve memory exclusivity violations in some WorkflowObserver… [fix]: resolve memory exclusivity violations in some WorkflowObserver paths May 22, 2023
/// - isExternal: Whether the handled action came from the 'outside world' vs being bubbled up from a child node
/// - Returns: An optional `Output` produced by the action application
func openAndApply<A: WorkflowAction>(
_ action: A,
to state: inout WorkflowType.State,
Copy link
Contributor Author

Choose a reason for hiding this comment

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

the diff makes this a bit confusing, but removing this parameter just means that self.state is no longer shadowed in this method

@jamieQ jamieQ marked this pull request as ready for review May 22, 2023 18:02
@jamieQ jamieQ requested a review from a team as a code owner May 22, 2023 18:02
@jamieQ jamieQ merged commit 51429c6 into main May 22, 2023
@jamieQ jamieQ deleted the jquadri/observer-exclusive-access-crash-fix branch May 22, 2023 20:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants