1
0
Fork 0
mirror of https://github.com/LadybirdBrowser/ladybird.git synced 2025-06-08 05:27:14 +09:00

LibWasm: Quit early in memory_fill if store_to_memory traps

We shouldn't try to run the next 'instruction' if we trap.
Unbreaks the memory-fill test in wpt.
This commit is contained in:
Ali Mohammad Pur 2025-05-21 16:22:32 +02:00 committed by Tim Ledbetter
parent bfc1ebb2d4
commit 83995ada1f
Notes: github-actions[bot] 2025-05-22 06:37:04 +00:00

View file

@ -662,8 +662,11 @@ ALWAYS_INLINE void BytecodeInterpreter::interpret_instruction(Configuration& con
if (count == 0)
return;
for (u32 i = 0; i < count; ++i)
for (u32 i = 0; i < count; ++i) {
store_to_memory(configuration, Instruction::MemoryArgument { 0, 0 }, { &value, sizeof(value) }, destination_offset + i);
if (did_trap())
return;
}
return;
}