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

Remove UB regarding connection state for async functions in any_connections #367

Open
anarthal opened this issue Oct 5, 2024 · 0 comments
Labels
enhancement New feature or request security

Comments

@anarthal
Copy link
Collaborator

anarthal commented Oct 5, 2024

We currently have a surprisingly big number of places where initiating an async operation derives in unpredictable and/or undefined behavior, . Since the introduction of any_connection, which does not expose the stream, all of these can be fixed to fail in a predictable way, without overhead. These are:

  • Initiating any async op while another op is outstanding.
  • Initiating any op after a previous op failed with a fatal error.
  • Initiating any op after a multi-function operation is initiated but not logically completed.
  • We can probably improve diagnostics when trying to use an unconnected connection.

A simple state machine in any_connection should suffice.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request security
Projects
None yet
Development

No branches or pull requests

1 participant