ladybird/Userland/Libraries/LibJS/Heap
Daniel Bertalan 2b69af2dfe AK+LibJS: Handle NaN-boxing pointers on AArch64
JS::Value stores 48 bit pointers to separately allocated objects in its
payload. On x86-64, canonical addresses have their top 16 bits set to
the same value as bit 47, effectively meaning that the value has to be
sign-extended to get the pointer. AArch64, however, expects the topmost
bits to be all zeros.

This commit gates sign extension behind `#if ARCH(X86_64)`, and adds an
`#error` for unsupported architectures, so that we do not forget to
think about pointer handling when porting to a new architecture.

Fixes #15290
Fixes SerenityOS/ladybird#56
2022-09-21 11:55:57 +02:00
..
BlockAllocator.cpp Libraries: Use default constructors/destructors in LibJS 2022-03-16 16:19:40 +00:00
BlockAllocator.h Libraries: Use default constructors/destructors in LibJS 2022-03-16 16:19:40 +00:00
Cell.h LibJS: Add Cell::Visitor::visit(Cell&) 2022-09-03 00:36:26 +02:00
CellAllocator.cpp LibJS: Use default instead of an empty constructor/destructor 2021-09-16 17:17:13 +02:00
CellAllocator.h Userland: Remove a bunch of unnecessary Vector imports 2022-01-28 23:40:25 +01:00
DeferGC.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
GCPtr.h LibJS: Add GCPtr and NonnullGCPtr 2022-09-03 00:36:26 +02:00
Handle.cpp LibJS: Make Handle<T> more user-friendly 2022-09-03 00:36:26 +02:00
Handle.h LibJS: Make Handle<T> more user-friendly 2022-09-03 00:36:26 +02:00
Heap.cpp AK+LibJS: Handle NaN-boxing pointers on AArch64 2022-09-21 11:55:57 +02:00
Heap.h LibWeb+LibJS: Make the EventTarget hierarchy (incl. DOM) GC-allocated 2022-09-06 00:27:09 +02:00
HeapBlock.cpp LibJS: Fix ASAN poisoning range in new HeapBlocks 2021-09-11 17:00:07 +02:00
HeapBlock.h LibJS: Add JS_CELL macro and use it in all JS::Cell subclasses 2022-08-29 03:24:54 +02:00
MarkedVector.cpp LibJS: Let MarkedVector<T> inherit from Vector and handle Cell* + Value 2022-02-09 12:25:27 +00:00
MarkedVector.h LibJS: Let MarkedVector<T> inherit from Vector and handle Cell* + Value 2022-02-09 12:25:27 +00:00