Yoctopuce dev
e57aa7e70a
py/obj: Fix nan handling in object REPR_C and REPR_D.
...
CPython math.nan is positive with regards to copysign. The signaling bit
(aka sign flag) was incorrectly set.
In addition, REPR_C and REPR_D should only use the _true_ nan to prevent
system crash in case of hand-crafted floats. For instance, with REPR_C,
any nan-like float following the pattern
`01111111 1xxxxxxx xxxxxxxx xxxxx1xx` would be switched to an immediate
object or a qstr string. When the qstr index is too large, this would
cause a crash.
This commit fixes the issue, and adds the relevant test cases.
Signed-off-by: Yoctopuce dev <dev@yoctopuce.com >
2025-06-24 00:30:08 +10:00
..
2023-06-08 17:54:24 +10:00
2020-03-30 13:21:58 +11:00
2020-03-30 13:21:58 +11:00
2020-03-30 13:21:58 +11:00
2020-03-30 13:21:58 +11:00
2020-03-30 13:21:58 +11:00
2020-03-30 13:21:58 +11:00
2023-06-08 17:54:24 +10:00
2023-06-08 17:54:24 +10:00
2023-02-09 15:20:00 +11:00
2020-04-18 22:36:49 +10:00
2020-08-29 15:18:01 +10:00
2020-03-30 13:21:58 +11:00
2025-06-10 15:41:24 +10:00
2022-07-25 16:11:26 +10:00
2020-08-29 14:12:20 +10:00
2020-08-29 14:12:20 +10:00
2022-02-02 16:49:55 +11:00
2024-05-28 10:49:22 +10:00
2024-05-28 10:49:22 +10:00
2024-05-28 10:49:22 +10:00
2025-06-24 00:30:08 +10:00
2020-03-30 13:21:58 +11:00
2020-03-30 13:21:58 +11:00
2020-03-30 13:21:58 +11:00
2022-07-25 14:23:34 +10:00
2022-07-26 22:23:47 +10:00
2022-07-26 22:23:47 +10:00
2022-08-12 23:53:34 +10:00
2024-09-06 11:08:39 +10:00
2023-09-29 12:00:15 +10:00
2022-08-12 23:53:34 +10:00
2020-03-30 13:21:58 +11:00
2025-02-28 13:35:12 +11:00
2024-03-20 14:13:49 +11:00
2024-03-20 14:13:49 +11:00
2023-12-06 14:06:01 +11:00
2022-02-02 16:49:55 +11:00
2022-02-02 16:49:55 +11:00
2022-02-02 16:49:55 +11:00
2020-03-30 13:23:05 +11:00
2014-07-05 06:14:29 +01:00
2025-06-24 00:30:08 +10:00
2025-05-22 17:19:03 +10:00
2023-06-18 12:45:55 +10:00
2023-06-18 12:45:55 +10:00
2023-02-16 10:38:38 +11:00
2023-09-29 12:02:21 +10:00
2022-07-25 16:11:26 +10:00
2020-03-30 13:21:58 +11:00
2020-03-30 13:21:58 +11:00
2020-03-30 13:21:58 +11:00
2020-03-30 13:21:58 +11:00
2023-02-16 10:38:38 +11:00
2023-02-16 10:38:38 +11:00
2020-03-30 13:21:58 +11:00
2019-08-17 23:23:17 +10:00
2020-03-30 13:21:58 +11:00
2018-06-12 12:17:43 +10:00
2020-03-30 13:21:58 +11:00
2020-03-30 13:21:58 +11:00
2020-03-30 13:21:58 +11:00
2020-03-30 13:21:58 +11:00
2020-03-30 13:21:58 +11:00
2017-06-13 13:36:56 +10:00
2022-08-12 23:53:34 +10:00
2020-03-30 13:21:58 +11:00
2020-03-30 13:21:58 +11:00
2014-04-17 16:21:43 +01:00