[Python-Dev] Integer Overflow
Thu, 14 Sep 2000 03:44:37 -0400
Glad you found it! Note that the result of shifting a 32-bit integer *by*
32 isn't defined in C (gotta love it ...), so "no-op" was lucky.
> -----Original Message-----
> From: Martin v. Loewis [mailto:firstname.lastname@example.org]
> Sent: Thursday, September 14, 2000 3:32 AM
> To: email@example.com
> Cc: firstname.lastname@example.org
> Subject: Re: [Python-Dev] Integer Overflow
> > Works for me (Windows). Local corruption? Compiler optimization error?
> > Config screwup?
> Config screwup. I simultaneously try glibc betas, and 2.1.93 manages
> to define LONG_BIT as 64 (due to testing whether INT_MAX is 2147483647
> at a time when INT_MAX is not yet defined). Shifting by LONG_BIT/2 is
> then a no-op, so ah=a, bh=b in int_mul. gcc did warn about this, but I
> ignored/forgot about the warning.
> I reported that to the glibc people, and worked-around it locally.
> Sorry for the confusion,