1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 21:08:12 +00:00
serenity/Userland/Libraries
Timothy Flynn 9e50f25ac4 LibJS: Prevent i64 overflow when computing large NumberFormat exponents
The largest exponents we compute are on the order of 10^21 (governed by
the maximumSignificantDigits option, which has a max value of 21). That
is too large to fit into the i64 we were using when multiplying this
exponent by the value to be formatted.

Instead, split up the logic to multiply that value by this exponent
based on the value's underlying type:

Number: Do not cast the result of pow() to an i64, and perform the
follow-up multiplication with doubles.

BigInt: Do not use pow(). Instead, compute the exponent as a BigInt
from the start, then perform the follow-up multiplication with that
BigInt.
2022-07-18 08:51:07 +01:00
..
LibArchive Everywhere: Add sv suffix to strings relying on StringView(char const*) 2022-07-12 23:11:35 +02:00
LibAudio Everywhere: Add sv suffix to strings relying on StringView(char const*) 2022-07-12 23:11:35 +02:00
LibC Kernel+LibC: Add posix_fallocate syscall 2022-07-15 12:42:43 +02:00
LibCards Everywhere: Add sv suffix to strings relying on StringView(char const*) 2022-07-12 23:11:35 +02:00
LibChess Everywhere: Replace single-char StringView op. arguments with chars 2022-07-12 23:11:35 +02:00
LibCodeComprehension Everywhere: Replace single-char StringView op. arguments with chars 2022-07-12 23:11:35 +02:00
LibCompress LibCompress: Write Deflate window size in the Zlib header 2022-07-10 13:52:18 +03:00
LibConfig LibConfig+ConfigServer: Write config values synchronously 2022-04-26 22:51:49 +02:00
LibCore LibCore: InspectorServerConnection send responses with multiple writes 2022-07-15 12:38:35 +02:00
LibCoredump Everywhere: Replace single-char StringView op. arguments with chars 2022-07-12 23:11:35 +02:00
LibCpp Everywhere: Replace single-char StringView op. arguments with chars 2022-07-12 23:11:35 +02:00
LibCrypt Everywhere: Explicitly specify the size in StringView constructors 2022-07-12 23:11:35 +02:00
LibCrypto Everywhere: Add sv suffix to strings relying on StringView(char const*) 2022-07-12 23:11:35 +02:00
LibDebug Everywhere: Replace single-char StringView op. arguments with chars 2022-07-12 23:11:35 +02:00
LibDesktop Everywhere: Add sv suffix to strings relying on StringView(char const*) 2022-07-12 23:11:35 +02:00
LibDeviceTree Libraries: Add LibDeviceTree for manipulating OpenFirmware Device Trees 2021-10-21 19:20:03 -07:00
LibDiff Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
LibDl Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
LibDNS Everywhere: Add sv suffix to strings relying on StringView(char const*) 2022-07-12 23:11:35 +02:00
LibDSP LibDSP: Fix keyboard glitch in Classic 2022-05-26 10:24:43 +01:00
LibEDID Everywhere: Split Error::from_string_literal and Error::from_string_view 2022-07-12 23:11:35 +02:00
LibELF Everywhere: Use default StringView constructor over nullptr 2022-07-12 23:11:35 +02:00
LibFileSystemAccessClient Everywhere: Split Error::from_string_literal and Error::from_string_view 2022-07-12 23:11:35 +02:00
LibGemini Everywhere: Replace single-char StringView op. arguments with chars 2022-07-12 23:11:35 +02:00
LibGfx LibGfx: Fix direction of vertical gradients 2022-07-17 20:11:38 +01:00
LibGL Everywhere: Replace single-char StringView op. arguments with chars 2022-07-12 23:11:35 +02:00
LibGPU LibGPU: Do not load LibSoftGPU via symlink inside Serenity 2022-06-13 21:45:27 +01:00
LibGUI LibGUI: Apply more padding to text on tabs 2022-07-15 12:43:16 +02:00
LibHTTP Everywhere: Add sv suffix to strings relying on StringView(char const*) 2022-07-12 23:11:35 +02:00
LibImageDecoderClient Userland: Rename IPC::ServerConnection=>IPC::ConnectionToServer 2022-02-25 22:35:12 +01:00
LibIMAP Everywhere: Replace single-char StringView op. arguments with chars 2022-07-12 23:11:35 +02:00
LibIPC LibIPC: Retry post_message write on EAGAIN and yield 2022-07-15 12:38:35 +02:00
LibJS LibJS: Prevent i64 overflow when computing large NumberFormat exponents 2022-07-18 08:51:07 +01:00
LibKeyboard Everywhere: Add sv suffix to strings relying on StringView(char const*) 2022-07-12 23:11:35 +02:00
LibLine LibLine: Ignore empty spans when stylizing 2022-07-17 00:51:31 +00:00
LibM LibM: Implement fma 2022-07-08 22:27:38 +00:00
LibMain Everywhere: Explicitly specify the size in StringView constructors 2022-07-12 23:11:35 +02:00
LibMarkdown Everywhere: Replace single-char StringView op. arguments with chars 2022-07-12 23:11:35 +02:00
LibPCIDB Everywhere: Add sv suffix to strings relying on StringView(char const*) 2022-07-12 23:11:35 +02:00
LibPDF Everywhere: Replace single-char StringView op. arguments with chars 2022-07-12 23:11:35 +02:00
LibProtocol LibCore+Everywhere: Make Core::Stream::read() return Bytes 2022-04-16 13:27:51 -04:00
LibPthread LibPthread: Set errno in sem_trywait() 2022-06-12 00:28:26 +01:00
LibRegex LibRegex: Remove RegexStringView(char const*) constructor 2022-07-12 23:11:35 +02:00
LibSanitizer Everywhere: Add sv suffix to strings relying on StringView(char const*) 2022-07-12 23:11:35 +02:00
LibSoftGPU Everywhere: Fix a bunch of typos 2022-05-29 15:22:00 +02:00
LibSQL Everywhere: Replace single-char StringView op. arguments with chars 2022-07-12 23:11:35 +02:00
LibSymbolication Everywhere: Add sv suffix to strings relying on StringView(char const*) 2022-07-12 23:11:35 +02:00
LibSyntax Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
LibSystem Meta+Userland: Add ENABLE_USERSPACE_COVERAGE_COLLECTION CMake option 2022-05-02 01:46:18 +02:00
LibTest LibCore: Replace the ArgsParser option argument setting with an enum 2022-07-14 00:24:24 +01:00
LibTextCodec Everywhere: Add sv suffix to strings relying on StringView(char const*) 2022-07-12 23:11:35 +02:00
LibThreading Everywhere: Use default StringView constructor over nullptr 2022-07-12 23:11:35 +02:00
LibTimeZone Everywhere: Explicitly specify the size in StringView constructors 2022-07-12 23:11:35 +02:00
LibTLS Everywhere: Add sv suffix to strings relying on StringView(char const*) 2022-07-12 23:11:35 +02:00
LibUnicode LibUnicode: Remove obsolete Unicode::get_default_number_system 2022-07-15 12:31:43 +02:00
LibUSBDB Everywhere: Add sv suffix to strings relying on StringView(char const*) 2022-07-12 23:11:35 +02:00
LibVideo Everywhere: Add sv suffix to strings relying on StringView(char const*) 2022-07-12 23:11:35 +02:00
LibVT LibVT: Remove Vector<Kernel::KString> title stack 2022-07-14 13:13:48 +02:00
LibWasm Everywhere: Replace single-char StringView op. arguments with chars 2022-07-12 23:11:35 +02:00
LibWeb LibWeb: Update incorrect Fetch namespaces 2022-07-18 08:14:04 +01:00
LibWebSocket Everywhere: Replace single-char StringView op. arguments with chars 2022-07-12 23:11:35 +02:00
LibWebView Everywhere: Add sv suffix to strings relying on StringView(char const*) 2022-07-12 23:11:35 +02:00
LibX86 Everywhere: Replace single-char StringView op. arguments with chars 2022-07-12 23:11:35 +02:00
LibXML Everywhere: Add sv suffix to strings relying on StringView(char const*) 2022-07-12 23:11:35 +02:00
CMakeLists.txt LibCodeComprehension: Re-organize code comprehension related code 2022-05-21 18:15:58 +02:00