Commit a68b75d
smorivan
bug core: fix http client destruction order
This fixes crashes on service shutdown after the "split `HttpClientCore` and `HttpClient`" PR.
Estimated crash root cause: `components::TestsuiteSupport` could (via `testsuite::HttpAllowedUrlsExtra`) hold onto `clients::http::ClientCore` past the destruction of `components::HttpClientCore`. This would lead to `clients::http::ClientCore` continuing to serve detached requests (via `easy` & `multi`) after the dependencies of `HttpClientCore` (including `clients::dns::Component`, `components::StatisticsStorage`, `components::DynamicConfig`, and a part of `components::TestsuiteSupport` fields) are destroyed, which caused use-after-free in HTTP client internals.
commit_hash:8fd7fa69bc78c0cce74aa0fc6194f6169e703ffe1 parent 6529f5c commit a68b75d
File tree
3 files changed
+4
-6
lines changed- core
- include/userver/testsuite
- src
- clients/http
- testsuite
3 files changed
+4
-6
lines changedLines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | | - | |
| 19 | + | |
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
24 | | - | |
| 24 | + | |
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
93 | 93 | | |
94 | 94 | | |
95 | 95 | | |
96 | | - | |
| 96 | + | |
97 | 97 | | |
98 | 98 | | |
99 | 99 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
12 | | - | |
13 | | - | |
| 11 | + | |
14 | 12 | | |
15 | 13 | | |
16 | 14 | | |
| |||
0 commit comments