From dc8f514bfa4617861b51b6cef23af73464d3b650 Mon Sep 17 00:00:00 2001 From: Alon Zakai Date: Fri, 3 Mar 2023 08:05:03 -0800 Subject: getHeapTypeCounts() must note select types for references (#5540) Without this we hit an assertion on trying to write the binary, on a missing heap type. --- src/ir/module-utils.cpp | 3 +++ test/lit/passes/gufa-vs-cfp.wast | 4 ++-- test/lit/select-gc.wat | 26 ++++++++++++++++++++++++++ 3 files changed, 31 insertions(+), 2 deletions(-) create mode 100644 test/lit/select-gc.wat diff --git a/src/ir/module-utils.cpp b/src/ir/module-utils.cpp index a6d2633ff..a2abcd5b5 100644 --- a/src/ir/module-utils.cpp +++ b/src/ir/module-utils.cpp @@ -63,6 +63,9 @@ struct CodeScanner counts.note(call->target->type); } else if (curr->is()) { counts.note(curr->type); + } else if (curr->is