Daniel Bertalan
0a05f04d1b
LibJS: Fix UB in Number.IsSafeInteger
...
Casting a floating point number to an integer and comparing that against
the original value is not a good way to test if it is a whole number. It
may cause unnecessary narrowing conversion issues and UB. This was the
case, which was caught be Clang's `-fsanitize=float-cast-overflow`.
This commit changes the code to use `is_integral_number`, as suggested
in ECMA-262.
2021-08-08 10:55:36 +02:00
..
2021-08-07 13:10:35 +01:00
2021-08-01 08:10:16 +02:00
2021-08-07 11:32:16 +02:00
2021-08-06 16:17:25 +01:00
2021-08-03 00:14:48 +01:00
2021-08-03 00:14:48 +01:00
2021-08-01 08:10:16 +02:00
2021-08-01 08:10:16 +02:00
2021-08-07 13:10:35 +01:00
2021-08-01 08:10:16 +02:00
2021-08-01 08:10:16 +02:00
2021-07-27 19:51:44 +01:00
2021-08-03 00:14:48 +01:00
2021-08-07 13:10:35 +01:00
2021-08-01 08:10:16 +02:00
2021-08-01 08:10:16 +02:00
2021-08-01 20:31:31 +01:00
2021-07-27 19:51:44 +01:00
2021-08-01 08:10:16 +02:00
2021-08-01 08:10:16 +02:00
2021-08-08 10:55:36 +02:00
2021-08-08 10:55:36 +02:00
2021-08-01 08:10:16 +02:00
2021-08-01 08:10:16 +02:00
2021-08-03 10:46:43 +02:00
2021-08-04 11:18:24 +02:00
2021-08-04 11:18:24 +02:00
2021-08-01 08:10:16 +02:00
2021-08-01 08:10:16 +02:00
2021-07-30 21:26:31 +01:00
2021-07-23 23:06:57 +01:00
2021-07-23 23:06:57 +01:00
2021-08-01 08:10:16 +02:00
2021-08-01 08:10:16 +02:00
2021-08-04 11:18:24 +02:00
2021-08-01 08:10:16 +02:00
2021-07-27 22:35:24 +01:00
2021-07-27 22:35:24 +01:00
2021-08-01 08:10:16 +02:00
2021-08-01 08:10:16 +02:00
2021-08-06 16:17:25 +01:00
2021-08-06 16:17:25 +01:00
2021-08-03 10:46:43 +02:00
2021-08-01 08:10:16 +02:00
2021-08-01 08:10:16 +02:00
2021-08-01 08:10:16 +02:00