Fixed ASAN issues
This commit is contained in:
parent
bc69521a91
commit
a96163d9d3
|
@ -1086,8 +1086,9 @@ ACTOR Future<Void> waitVersionCommitted(Reference<BlobWorkerData> bwData,
|
|||
// this order is important, since we need to register a waiter on the notified version before waking the GRV
|
||||
// actor
|
||||
Future<Void> grvAtLeast = bwData->grvVersion.whenAtLeast(version);
|
||||
if (bwData->doGRVCheck.canBeSet()) {
|
||||
bwData->doGRVCheck.send(Void());
|
||||
Promise<Void> doGrvCheck = bwData->doGRVCheck;
|
||||
if (doGrvCheck.canBeSet()) {
|
||||
doGrvCheck.send(Void());
|
||||
}
|
||||
wait(grvAtLeast);
|
||||
}
|
||||
|
@ -2742,7 +2743,7 @@ ACTOR Future<Void> runGRVChecks(Reference<BlobWorkerData> bwData) {
|
|||
while (bwData->grvVersion.numWaiting() == 0) {
|
||||
// printf("GRV checker sleeping\n");
|
||||
wait(bwData->doGRVCheck.getFuture());
|
||||
bwData->doGRVCheck.reset();
|
||||
bwData->doGRVCheck = Promise<Void>();
|
||||
// printf("GRV checker waking: %d pending\n", bwData->grvVersion.numWaiting());
|
||||
}
|
||||
|
||||
|
|
|
@ -1006,13 +1006,17 @@ struct NotifiedQueue : private SingleCallback<T>, FastAllocated<NotifiedQueue<T>
|
|||
if (error.isValid())
|
||||
return;
|
||||
|
||||
ASSERT(this->error.code() != error_code_success);
|
||||
this->error = err;
|
||||
if (shouldFireImmediately()) {
|
||||
SingleCallback<T>::next->error(err);
|
||||
}
|
||||
|
||||
// end_of_stream error is "expected", don't terminate reading stream early for this
|
||||
if (onError.isValid() && err.code() != error_code_end_of_stream) {
|
||||
// weird destruction issue with sending broken_promise, so just ignore it. Stream is dead anyway. TODO better
|
||||
// fix?
|
||||
if (err.code() != error_code_end_of_stream && err.code() != error_code_broken_promise && onError.isValid()) {
|
||||
ASSERT(onError.canBeSet());
|
||||
onError.sendError(err);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue