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

fix: remove direct pointer dereference to avoid concurrent usage #2208

Closed
wants to merge 3 commits into from

Conversation

Revolyssup
Copy link
Contributor

@Revolyssup Revolyssup commented Apr 11, 2024

Type of change:

Context: #2168 (comment)

  • Bugfix
  • New feature provided
  • Improve performance
  • Backport patches
  • Documentation
  • Refactor
  • Chore
  • CI/CD or Tests

What this PR does / why we need it:

Pre-submission checklist:

  • Did you explain what problem does this PR solve? Or what new features have been added?
  • Have you added corresponding test cases?
  • Have you modified the corresponding document?
  • Is this PR backward compatible? If it is not backward compatible, please discuss on the mailing list first

@AlinsRan
Copy link
Contributor

When generating code, it will overwrite the original content, which is not a good solution.

@Revolyssup
Copy link
Contributor Author

When generating code, it will overwrite the original content, which is not a good solution.

Yeah. How do you think we can get around this?

*out = *in

causes these structs internal pointers pointing to same addresses before the code afterwards can run and perform deepcopy. This is causing the concurrent access.

@Revolyssup Revolyssup closed this Apr 16, 2024
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.

2 participants