Commit 77618b6
michael stack
Fix uninitialized targetServer when first DC has empty server list
The targetServer was only set when dcid == 0, but dcid gets incremented
even for empty DC server lists (via continue). So if the first DC had an
empty server list, dcid would be 1 when we encounter the first non-empty
DC, and targetServer would never be set, causing a crash when accessed.
Fixed by using a targetServerSet flag instead of checking dcid == 0.
Now targetServer is set on the FIRST non-empty DC, regardless of index.
This was the root cause of -2 crashes in general test runs.1 parent 6f8be78 commit 77618b6
1 file changed
+14
-12
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4465 | 4465 | | |
4466 | 4466 | | |
4467 | 4467 | | |
4468 | | - | |
4469 | | - | |
4470 | | - | |
4471 | | - | |
4472 | | - | |
4473 | | - | |
4474 | | - | |
4475 | | - | |
4476 | | - | |
4477 | | - | |
4478 | | - | |
4479 | | - | |
| 4468 | + | |
| 4469 | + | |
| 4470 | + | |
| 4471 | + | |
| 4472 | + | |
| 4473 | + | |
| 4474 | + | |
| 4475 | + | |
| 4476 | + | |
| 4477 | + | |
| 4478 | + | |
| 4479 | + | |
| 4480 | + | |
| 4481 | + | |
4480 | 4482 | | |
4481 | 4483 | | |
4482 | 4484 | | |
| |||
0 commit comments