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:
parent
bfc1ebb2d4
commit
83995ada1f
Notes:
github-actions[bot]
2025-05-22 06:37:04 +00:00
Author: https://github.com/alimpfard
Commit: 83995ada1f
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/4833
Reviewed-by: https://github.com/ADKaster
Reviewed-by: https://github.com/tcl3 ✅
1 changed files with 4 additions and 1 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue