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 schuppenies
Recipients amaury.forgeotdarc, loewis, schuppenies
Date 2008-06-26.07:47:09
SpamBayes Score 0.001885144
Marked as misclassified No
Message-id <1214466432.84.0.28309711797.issue3147@psf.upfronthosting.co.za>
In-reply-to
Content
The tests still do not pass on the AMD64 W2k8. Surprisingly,
struct.calcsize behaves as expected, but sizeof() on the C level does
not. The former seems to assumes long to be 4 byte in size, the latter
8!

The tests pass until it comes to a situation where the size of long
affects the alignment of the structure end. In this case long and
function.
long's structure is 'lP PP l H' which gives an expected size of

8+8+16+4+2(+2) = 40

At least this how I think it should be and struct.calcsize does,
too. But what seems to be computed is

8+8+16+8+2(+6) = 48.

It appears as if sizeof(long) = 8. The same explanation holds true for
the failure on the function size which is 'lp PP 9l' and
struct.calcsize : 8+8+16+36(+4) = 72
sizeof          : 8+8+16+72     = 104

Now I don't know how I should address this problem. It seems to be
Windows AMD64 specific, but I found a post [1] which indicates that
it's Windows AMD64 on Windows 2K specific. Tests do also fail on the
Win64 XP buildbot, but it gets killed before the verbose output is
generated. I don't have access to such a platform, so I cannot verify
it.

It may also be a problem with struct.calcsize on Win64.

Any suggestions?

[1]
http://www.velocityreviews.com/forums/t491385-different-behavior-of-amd64-compiler-14004031041-on-windows-xp-and-2k.html
History
Date User Action Args
2008-06-26 07:47:13schuppeniessetspambayes_score: 0.00188514 -> 0.001885144
recipients: + schuppenies, loewis, amaury.forgeotdarc
2008-06-26 07:47:13schuppeniessetspambayes_score: 0.00188514 -> 0.00188514
messageid: <1214466432.84.0.28309711797.issue3147@psf.upfronthosting.co.za>
2008-06-26 07:47:12schuppenieslinkissue3147 messages
2008-06-26 07:47:10schuppeniescreate