1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2026-01-12 23:41:00 +00:00
serenity/Userland
Andreas Kling 077406dc36 LibJS: Fix two issues with array (length > INT32_MAX)
1. Allow Value(size_t) and use it for array length properties.

If an array length can't fit in an Int32 value, we shouldn't go out of
or way to force it into one. Instead, for values above INT32_MAX,
we simply store them as Double values.

2. Switch to generic indexed property storage for large arrays.

Previously we would always allocate array storage eagerly when the
length property was set. This meant that "a.length = 0x80000000" would
trivially DOS the engine on 32-bit since we don't have that much VM.

We now switch to generic storage when changing the length moves us over
the 4M entry mark.

Fixes #5986.
2021-03-30 13:52:56 +02:00
..
Applications FontEditor+TextEditor+Playground: Refuse to load device files 2021-03-30 11:29:52 +02:00
Demos Everywhere: Change font properties to be described in GML 2021-03-29 09:10:23 +02:00
DevTools FontEditor+TextEditor+Playground: Refuse to load device files 2021-03-30 11:29:52 +02:00
DynamicLoader LibC: Add x86_64 Registers 2021-03-21 09:35:23 +01:00
Games Chess: Added option to toggle showing moves 2021-03-27 23:37:06 +01:00
Libraries LibJS: Fix two issues with array (length > INT32_MAX) 2021-03-30 13:52:56 +02:00
MenuApplets MenuApplets: Remove old clock/calendar applet 2021-03-30 10:34:34 +02:00
Services Taskbar: Update ClockWidget to Calendar view changes 2021-03-30 10:34:34 +02:00
Shell Shell: Add tests for slices 2021-03-22 13:15:08 +01:00
Tests Tests: Create stress-writeread 2021-03-17 23:22:42 +01:00
Utilities LibElf+readelf: Parse ELFs with no program headers correctly 2021-03-29 19:57:19 +02:00
CMakeLists.txt Build: Build Userland with -O2, Kernel with -Os 2021-02-24 11:38:52 +01:00