-
-
Notifications
You must be signed in to change notification settings - Fork 31.8k
test_pack_unpack_roundtrip_for_nans failing on RISC-V buildbot #133304
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
bisect to 6157135 CC: @skirpichev @vstinner |
An example:
Here lost all payload of quiet nan together with a sign bit. For signaling nan - lost payload means it's not a nan anymore, that explains Seems to be a platform bug, which reveal new patch. I suspect bad things happens in the PyFloat_Unpack4(), after we return |
Ok, indeed the culpit is "If a NaN value is converted to a different floating-point type, the result is the canonical NaN of the new type" from RISC-V spec. (also: "The canonical NaN has a positive sign and all significand bits clear except the MSB, a.k.a. the quiet bit.") N.B. we unset MSB bit (after L2188) for signaling nans - making a positive infinities for risc-v... I see following options: 1) filter out this non-IEEE platform in this test (not sure how to do this properly), 2) copy sign bit & payload from |
PR is ready: #133328 (implements option (2) workaround). |
Fixed by f16f06f. |
Thanks @furkanonder for the report and thanks @skirpichev for the fix! |
Bug report
Bug description:
The
test_capi
module'stest_float
are failing on RISC-V build botCPython versions tested on:
CPython main branch
Operating systems tested on:
Linux
Linked PRs
The text was updated successfully, but these errors were encountered: