mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2026-06-24 10:20:21 +00:00
Pass 3 cross-checks the structural metadata stored alongside the bytecode buffer on Executable against the offset set built during Pass 1. Every basic block start offset must point at an instruction boundary; exception handler start, end, and handler offsets must either be at an instruction boundary or, for the inclusive-start / exclusive-end pair, equal to the bytecode length; source map entries must do the same. Of these, the exception handler's handler_offset is the safety- critical one for the disk-cache use case: a corrupted offset there sends control flow into the middle of an instruction. The other checks tighten the cache-load surface area and catch obvious file corruption. The metadata is plumbed across the FFI as a separate FFIValidatorExtras struct so the validator entry point keeps the single-call shape, with a flat-offset mirror struct for exception handlers since the original carries no source data we need. |
||
|---|---|---|
| .. | ||
| AsmInterpreter | ||
| BasicBlock.cpp | ||
| BasicBlock.h | ||
| BuiltinAbstractOperationsEnabled.h | ||
| Builtins.h | ||
| Bytecode.def | ||
| ClassBlueprint.h | ||
| Debug.h | ||
| Executable.cpp | ||
| Executable.h | ||
| FormatOperand.h | ||
| IdentifierTable.cpp | ||
| IdentifierTable.h | ||
| Instruction.cpp | ||
| Instruction.h | ||
| Interpreter.cpp | ||
| Label.cpp | ||
| Label.h | ||
| Operand.h | ||
| PropertyAccess.h | ||
| PropertyKeyTable.cpp | ||
| PropertyKeyTable.h | ||
| PropertyNameIterator.cpp | ||
| PropertyNameIterator.h | ||
| PutKind.h | ||
| RegexTable.cpp | ||
| RegexTable.h | ||
| Register.h | ||
| StringTable.cpp | ||
| StringTable.h | ||
| Validator.cpp | ||
| Validator.h | ||