From 3fd9209715e801f6eeb9143a7513917384949544 Mon Sep 17 00:00:00 2001 From: Max Bernstein Date: Tue, 28 Nov 2023 16:38:42 -0500 Subject: [PATCH] Bail out in some tests --- runtime/bytecode.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/runtime/bytecode.cpp b/runtime/bytecode.cpp index 62c0d4219..fcc94df37 100644 --- a/runtime/bytecode.cpp +++ b/runtime/bytecode.cpp @@ -406,6 +406,10 @@ static void analyzeDefiniteAssignment(Thread* thread, // I don't want to deal with the block stack (yet?). return; } + if (num_opcodes == 0) { + // Some tests generate empty code objects. Bail out. + return; + } // Lattice definition uword top = kMaxUword; auto meet = [](uword left, uword right) { return left & right; };