This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author mark.dickinson
Recipients mark.dickinson, pgimeno
Date 2021-08-19.12:29:06
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
The bug is in this line:

which reads:

            (half_eps == 8 && (HEX_DIGIT(key_digit+1) & 1) != 0))

In the buggy case, key_digit=0 and the HEX_DIGIT macro is trying to retrieve the value of the second-to-least significant hex digit in the coefficient, to decide whether it's odd or not. For the "0x0.8" case it retrieves the "0". For the "0x.8" case, it retrieves the "x" and tries to interpret it as a hex digit.

Even worse, if we exclude the "0x" prefix, as in `float.fromhex(".8p-1074")`, `HEX_DIGIT(1)` is accessing memory that doesn't belong to the string.
Date User Action Args
2021-08-19 12:29:06mark.dickinsonsetrecipients: + mark.dickinson, pgimeno
2021-08-19 12:29:06mark.dickinsonsetmessageid: <>
2021-08-19 12:29:06mark.dickinsonlinkissue44954 messages
2021-08-19 12:29:06mark.dickinsoncreate