Fix a cluster controller crash in status server
The logSystemConfig could be changed after the yield(), thus the iterator can points to invalid memory. To reproduce with gcc build at commit 3e90644779: -f tests/slow/DDBalanceAndRemoveStatus.toml -s 3134372275 -b off
This commit is contained in:
parent
6d49a76a26
commit
0e93c685b5
|
@ -835,9 +835,8 @@ ACTOR static Future<JsonBuilderObject> processStatusFetcher(
|
|||
}
|
||||
|
||||
state std::vector<OldTLogConf>::const_iterator oldTLogIter;
|
||||
for (oldTLogIter = db->get().logSystemConfig.oldTLogs.begin();
|
||||
oldTLogIter != db->get().logSystemConfig.oldTLogs.end();
|
||||
++oldTLogIter) {
|
||||
state std::vector<OldTLogConf> oldTLogs = db->get().logSystemConfig.oldTLogs;
|
||||
for (oldTLogIter = oldTLogs.begin(); oldTLogIter != oldTLogs.end(); ++oldTLogIter) {
|
||||
for (auto& tLogSet : oldTLogIter->tLogs) {
|
||||
for (auto& it : tLogSet.tLogs) {
|
||||
if (it.present()) {
|
||||
|
|
Loading…
Reference in New Issue