mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-08 05:27:14 +09:00
LibWasm: Disable spammy 'memory access oob' debug prints
This commit is contained in:
parent
d79d5b70a5
commit
bfc1ebb2d4
Notes:
github-actions[bot]
2025-05-22 06:37:11 +00:00
Author: https://github.com/alimpfard
Commit: bfc1ebb2d4
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 4 deletions
|
@ -79,7 +79,7 @@ void BytecodeInterpreter::load_and_push(Configuration& configuration, Instructio
|
|||
u64 instance_address = static_cast<u64>(bit_cast<u32>(base)) + arg.offset;
|
||||
if (instance_address + sizeof(ReadType) > memory->size()) {
|
||||
m_trap = Trap::from_string("Memory access out of bounds");
|
||||
dbgln("LibWasm: Memory access out of bounds (expected {} to be less than or equal to {})", instance_address + sizeof(ReadType), memory->size());
|
||||
dbgln_if(WASM_TRACE_DEBUG, "LibWasm: Memory access out of bounds (expected {} to be less than or equal to {})", instance_address + sizeof(ReadType), memory->size());
|
||||
return;
|
||||
}
|
||||
dbgln_if(WASM_TRACE_DEBUG, "load({} : {}) -> stack", instance_address, sizeof(ReadType));
|
||||
|
@ -104,7 +104,7 @@ void BytecodeInterpreter::load_and_push_mxn(Configuration& configuration, Instru
|
|||
u64 instance_address = static_cast<u64>(bit_cast<u32>(base)) + arg.offset;
|
||||
if (instance_address + M * N / 8 > memory->size()) {
|
||||
m_trap = Trap::from_string("Memory access out of bounds");
|
||||
dbgln("LibWasm: Memory access out of bounds (expected {} to be less than or equal to {})", instance_address + M * N / 8, memory->size());
|
||||
dbgln_if(WASM_TRACE_DEBUG, "LibWasm: Memory access out of bounds (expected {} to be less than or equal to {})", instance_address + M * N / 8, memory->size());
|
||||
return;
|
||||
}
|
||||
dbgln_if(WASM_TRACE_DEBUG, "vec-load({} : {}) -> stack", instance_address, M * N / 8);
|
||||
|
@ -169,7 +169,7 @@ void BytecodeInterpreter::load_and_push_m_splat(Configuration& configuration, In
|
|||
u64 instance_address = static_cast<u64>(bit_cast<u32>(base)) + arg.offset;
|
||||
if (instance_address + M / 8 > memory->size()) {
|
||||
m_trap = Trap::from_string("Memory access out of bounds");
|
||||
dbgln("LibWasm: Memory access out of bounds (expected {} to be less than or equal to {})", instance_address + M / 8, memory->size());
|
||||
dbgln_if(WASM_TRACE_DEBUG, "LibWasm: Memory access out of bounds (expected {} to be less than or equal to {})", instance_address + M / 8, memory->size());
|
||||
return;
|
||||
}
|
||||
dbgln_if(WASM_TRACE_DEBUG, "vec-splat({} : {}) -> stack", instance_address, M / 8);
|
||||
|
@ -360,7 +360,7 @@ void BytecodeInterpreter::store_to_memory(Configuration& configuration, Instruct
|
|||
addition += data.size();
|
||||
if (addition.has_overflow() || addition.value() > memory->size()) {
|
||||
m_trap = Trap::from_string("Memory access out of bounds");
|
||||
dbgln("LibWasm: Memory access out of bounds (expected 0 <= {} and {} <= {})", instance_address, instance_address + data.size(), memory->size());
|
||||
dbgln_if(WASM_TRACE_DEBUG, "LibWasm: Memory access out of bounds (expected 0 <= {} and {} <= {})", instance_address, instance_address + data.size(), memory->size());
|
||||
return;
|
||||
}
|
||||
dbgln_if(WASM_TRACE_DEBUG, "temporary({}b) -> store({})", data.size(), instance_address);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue