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.

classification
Title: Possible loss of data warnings building 3.5 Visual Studio Windows 8.1 64 bit
Type: compile error Stage: resolved
Components: Extension Modules, Interpreter Core Versions: Python 3.5
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: serhiy.storchaka Nosy List: BreamoreBoy, python-dev, serhiy.storchaka, steve.dower, tim.golden, vstinner, zach.ware
Priority: normal Keywords: patch

Created on 2015-02-11 23:21 by BreamoreBoy, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
PossibleLossOfData.txt BreamoreBoy, 2015-02-11 23:21
int_overflows.patch serhiy.storchaka, 2015-02-12 08:19 review
signal_cast_socket_t.patch vstinner, 2015-02-12 11:49 review
Messages (14)
msg235777 - (view) Author: Mark Lawrence (BreamoreBoy) * Date: 2015-02-11 23:21
The attached file lists many of the warnings, but note there may be more as tkinter didn't build and is subject to #23449.
msg235780 - (view) Author: Mark Lawrence (BreamoreBoy) * Date: 2015-02-11 23:40
Using Microsoft Visual Studio Express 2013 for Windows Desktop.
msg235784 - (view) Author: Steve Dower (steve.dower) * (Python committer) Date: 2015-02-12 01:10
These are warnings about implicit downcasting in a 64-bit build. They're not fatal to the build or execution (as far as we know), and as nice as it would be to fix them all, "good" fixes may introduce behaviour changes (for example, new overflow errors).

As an aside, building with VS 2015 also shows a lot of warnings for variable shadowing, which should also be fixed but is not likely unless someone gets really annoyed by them. What's the usual policy on issues like this?
msg235795 - (view) Author: Mark Lawrence (BreamoreBoy) * Date: 2015-02-12 04:25
Changes to nosy list as advised by Terry Reedy on c.l.py
msg235804 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2015-02-12 08:19
Here is a patch which fixes many warnings reported by MS compiler on 64-bit platform [1]. Some of these warnings indicated real bugs.

[1] http://buildbot.python.org/all/builders/AMD64%20Windows8%203.x/builds/411/steps/compile/logs/warnings%20(396)
msg235812 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2015-02-12 11:46
The 64-bit support of Windows is still incomplete :-/ We tried to fix most of them, but there are still remaining issues.

The main issue is #9566. I opened for example the issue #18295: "Possible integer overflow in PyCode_New()".
msg235813 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2015-02-12 11:49
signal_cast_socket_t.patch: Fix warning in signal.set_wakeup_fd(). I introduced recently the warning when I added support for sockets in this function on Windows.
msg235821 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2015-02-12 13:38
signal_cast_socket_t.patch LGTM.
msg235825 - (view) Author: Steve Dower (steve.dower) * (Python committer) Date: 2015-02-12 14:22
Wow, I didn't expect that so quickly :)

I'll check these out as soon as I can, but they look okay from a quick glance on my phone.
msg235839 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2015-02-12 15:35
New changeset 9e10c4255277 by Victor Stinner in branch 'default':
Issue #23450: Fix signal.set_wakeup_fd() on Windows
https://hg.python.org/cpython/rev/9e10c4255277
msg235854 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2015-02-12 20:40
Please ignore changes to Objects/codeobject.c, Objects/funcobject.c and Python/ceval.c. The patch in issue18295 is more advanced.
msg235897 - (view) Author: Steve Dower (steve.dower) * (Python committer) Date: 2015-02-13 16:07
int_overflows.patch looks good to me.

I really appreciate that these patches have been done properly too - I've seen far too much code where people just throw in casts to silence the warnings. This is why I like working on Python :)
msg236107 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2015-02-16 19:14
New changeset a84ae2ccd220 by Serhiy Storchaka in branch 'default':
Issue #23450: Fixed possible integer overflows.
https://hg.python.org/cpython/rev/a84ae2ccd220

New changeset 1eee26b74e4b by Serhiy Storchaka in branch 'default':
Issue #23450: Silenced compiler warnings and added asserts in peephole optimizer.
https://hg.python.org/cpython/rev/1eee26b74e4b
msg236114 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2015-02-16 21:59
New changeset f47d683b6c9e by Serhiy Storchaka in branch 'default':
Fixed sizeof tests for ElementTree (issue #23450).
https://hg.python.org/cpython/rev/f47d683b6c9e
History
Date User Action Args
2022-04-11 14:58:12adminsetgithub: 67638
2015-02-16 21:59:32python-devsetmessages: + msg236114
2015-02-16 19:19:58serhiy.storchakasetstatus: open -> closed
assignee: serhiy.storchaka
resolution: fixed
stage: patch review -> resolved
2015-02-16 19:14:27python-devsetmessages: + msg236107
2015-02-13 16:07:11steve.dowersetmessages: + msg235897
2015-02-12 20:40:56serhiy.storchakasetmessages: + msg235854
2015-02-12 15:35:15python-devsetnosy: + python-dev
messages: + msg235839
2015-02-12 14:22:22steve.dowersetmessages: + msg235825
2015-02-12 13:38:02serhiy.storchakasetmessages: + msg235821
2015-02-12 11:49:50vstinnersetfiles: + signal_cast_socket_t.patch

messages: + msg235813
2015-02-12 11:46:17vstinnersetmessages: + msg235812
2015-02-12 08:19:53serhiy.storchakasetfiles: + int_overflows.patch
messages: + msg235804

components: + Extension Modules, Interpreter Core, - Build, Windows
keywords: + patch
stage: patch review
2015-02-12 04:25:34BreamoreBoysetnosy: + vstinner, serhiy.storchaka
messages: + msg235795
2015-02-12 01:10:47steve.dowersetmessages: + msg235784
2015-02-11 23:40:41BreamoreBoysetmessages: + msg235780
2015-02-11 23:21:04BreamoreBoycreate