Index: src/compiler/wasm-compiler.cc |
diff --git a/src/compiler/wasm-compiler.cc b/src/compiler/wasm-compiler.cc |
index a560cb1f62d9c9e2e23f1c68982603389c5309b1..9a9b190f0471615dd761d09bbae4be5578cd3a86 100644 |
--- a/src/compiler/wasm-compiler.cc |
+++ b/src/compiler/wasm-compiler.cc |
@@ -2956,8 +2956,10 @@ void WasmGraphBuilder::BuildWasmInterpreterEntry( |
sig->return_count() == 0 ? 0 : 1 << ElementSizeLog2Of(sig->GetReturn(0)); |
// Get a stack slot for the arguments. |
- Node* arg_buffer = graph()->NewNode(jsgraph()->machine()->StackSlot( |
- std::max(args_size_bytes, return_size_bytes))); |
+ Node* arg_buffer = args_size_bytes == 0 && return_size_bytes == 0 |
+ ? jsgraph()->IntPtrConstant(0) |
+ : graph()->NewNode(jsgraph()->machine()->StackSlot( |
+ std::max(args_size_bytes, return_size_bytes))); |
// Now store all our arguments to the buffer. |
int param_index = 0; |