boostorg / boostorg/mysql

Remove UB regarding connection state for async functions in any_connections

Đang mở
#367 0 bình luận 0 reaction 0 người được giao Xem trên GitHub
enhancement security
Ngôn ngữ chính
C++
Star
299
Fork
43
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

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.

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.