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, petdance, vstinner
Date 2020-05-01.16:08:40
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
As to _why_ it's a false positive: at that point in the code, assuming 30-bit limbs and an IEEE 754 binary64 "double", we have (using Python notation for floor division)

    a_size == 1 + (a_bits - 1) // 30


    shift_digits == (a_bits - 55) // 30

from which it's clear that

    shift_digits <= (a_bits - 1) // 30 < a_size

so a_size - shift_digits is always strictly positive.

The above doesn't depend on the precise values 55 and 30 - any other positive values would have worked, so even with 15-bit digits and some other double format with fewer bits, we still have "shift_digits < a_size".

And now since the v_rshift call writes "a_size - shift_digits" digits to x, we're guaranteed that at least one digit is written, so `x[0]` is not uninitialised.
Date User Action Args
2020-05-01 16:08:41mark.dickinsonsetrecipients: + mark.dickinson, vstinner, petdance
2020-05-01 16:08:41mark.dickinsonsetmessageid: <>
2020-05-01 16:08:41mark.dickinsonlinkissue40455 messages
2020-05-01 16:08:40mark.dickinsoncreate