[Python-Dev] Who understands _ssl.c on Windows?
Tim Peters
tim.peters at gmail.com
Sat Apr 8 07:55:55 CEST 2006
An "impossible problem" showed up on Bug Day, which got more
impossible the more I looked at it:
http://www.python.org/sf/1462352
See that for details. The short course is that socketmodule.c and
_ssl.c disagree about the offset at which the
sock_timeout
member of a
PySocketSockObject
struct lives. As a result, timeouts set on a socket "change by magic"
when _ssl.c looks at them.
This is certainly the case on the trunk under Windows on my box. No
idea about other platforms or Python versions. When someone figures
out the cause, those should be obvious ;-)
_Perhaps_ it's the case that doubles are aligned to an 8-byte boundary
when socketmodule.c is compiled, but (for some unknown reason) only to
a 4-byte boundary when _ssl.c is compiled. Although that seems to
match the details in the bug report, I have no theory for how that
could happen (I don't see any MS packing pragmas anywhere).
More information about the Python-Dev
mailing list