Fix stack overflows

This commit is contained in:
Jingyu Zhou 2022-11-09 21:08:50 -08:00
parent 2361acbe22
commit 80e0810bcc
1 changed files with 3 additions and 2 deletions

View File

@ -422,11 +422,12 @@ ACTOR static Future<Void> _parsePartitionedLogFileOnLoader(
state LogMessageVersion msgVersion;
msgVersion.version = reader.consumeNetworkUInt64();
msgVersion.sub = reader.consumeNetworkUInt32();
int msgSize = reader.consumeNetworkInt32();
const uint8_t* message = reader.consume(msgSize);
state int msgSize = reader.consumeNetworkInt32();
state const uint8_t* message = reader.consume(msgSize);
// Skip mutations out of the version range
if (!asset.isInVersionRange(msgVersion.version)) {
wait(yield()); // avoid potential stack overflows
continue;
}