From 571ea80e1101e706980ea8aefa7fc18a0c8ba2ec Mon Sep 17 00:00:00 2001 From: Aart Bik Date: Mon, 4 Mar 2019 19:30:53 +0000 Subject: [PATCH] [vm/compiler] added assert to kernel flowgraph builder Rationale: Yields a more gentle crash in debug mode for bug under investigation (found by DartFuzz) https://github.com/dart-lang/sdk/issues/36076 Change-Id: I497fbef1ec2100b9701848c3454bef5ad7518d2b Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/95280 Reviewed-by: Alexander Markov Commit-Queue: Aart Bik --- runtime/vm/compiler/frontend/kernel_binary_flowgraph.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/runtime/vm/compiler/frontend/kernel_binary_flowgraph.cc b/runtime/vm/compiler/frontend/kernel_binary_flowgraph.cc index 948a0d71185..d46bdc39502 100644 --- a/runtime/vm/compiler/frontend/kernel_binary_flowgraph.cc +++ b/runtime/vm/compiler/frontend/kernel_binary_flowgraph.cc @@ -2630,6 +2630,7 @@ Fragment StreamingFlowGraphBuilder::TranslateFinallyFinalizers( // While translating the body of a finalizer we need to set the try-finally // block which is active when translating the body. while (B->try_finally_block_ != outer_finally) { + ASSERT(B->try_finally_block_ != nullptr); // Set correct try depth (in case there are nested try statements). B->try_depth_ = B->try_finally_block_->try_depth();