Commit ece1f10
committed
Spin in DataTest waiting for connections to be established
As the added comment indicates, The QuicTestConnectAndPing function
locally allocates Secrets for the client and server connection for a
given 0RTT test. However, it doesn't wait for the connection to be
fully established before deciding the test is successful and returning.
Because the allocation of those Secrets was done with a unique_ptr,
leaving the scope of the function automatically deletes that memory,
which another thread may still be referencing while processing data in
the TLS backend, leading to ASAN errors.
Fix it by ensuring that the connection is fully established prior to
returinging (which implies that the TLS backend has completed filling
out secrets, and dropped any reference to the TlsSecrets pointer1 parent 7c82ab4 commit ece1f10
1 file changed
Lines changed: 21 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
626 | 626 | | |
627 | 627 | | |
628 | 628 | | |
| 629 | + | |
| 630 | + | |
| 631 | + | |
| 632 | + | |
| 633 | + | |
| 634 | + | |
| 635 | + | |
| 636 | + | |
| 637 | + | |
| 638 | + | |
| 639 | + | |
| 640 | + | |
| 641 | + | |
| 642 | + | |
| 643 | + | |
| 644 | + | |
| 645 | + | |
| 646 | + | |
| 647 | + | |
| 648 | + | |
| 649 | + | |
629 | 650 | | |
630 | 651 | | |
631 | 652 | | |
| |||
0 commit comments