From b14bf894b2888807f39f48b4c75a2bc68944efc8 Mon Sep 17 00:00:00 2001 From: Alon Zakai Date: Wed, 1 Nov 2023 15:10:11 -0700 Subject: [Wasm64] Fix PostEmscripten::optimizeExceptions on invokes with an i64 argument (#6074) In wasm64, function pointers are 64-bit like all pointers. fixes #6073 --- src/passes/PostEmscripten.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/passes/PostEmscripten.cpp b/src/passes/PostEmscripten.cpp index 39bc3e889..6dc32eaa8 100644 --- a/src/passes/PostEmscripten.cpp +++ b/src/passes/PostEmscripten.cpp @@ -317,7 +317,7 @@ struct PostEmscripten : public Pass { // The first operand is the function pointer index, which must be // constant if we are to optimize it statically. if (auto* index = curr->operands[0]->dynCast()) { - size_t indexValue = index->value.geti32(); + size_t indexValue = index->value.getInteger(); if (indexValue >= flatTable.names.size()) { // UB can lead to indirect calls to invalid pointers. return; -- cgit v1.2.3