New python PIDL checks cause 2221 new Coverity warnings

Green, Paul Paul.Green at
Wed Aug 26 15:02:18 UTC 2015

Kai wrote:

> > Andrew wrote:
> > The biggest challenge is that a number of cases only really come up on
> > 32 bit system, where a python long can't hold a uint32_t (on 64 bit it
> > can), and so PyInt_FromLong can fail.
> Who's still using 32bit systems these days? Only my ARM boxes still are 
> 32bit. :) Anyway, I'm still not convinced that this isn't exactly what 
> should be figured out during configure.

Careful!  That's not funny.  I'm also concerned that talking about "32-bit systems" is vague and confusing.

For example, here at Stratus, we port and maintain Samba on a 32-bit-based operating system. But saying that we have a 32-bit system doesn't tell the whole story. Our kernel supports a mixture of 32-bit and 64-bit primitives. For example, our GCC/POSIX environment has full 64-bit integers (long long, int64_t), 64-bit file offsets (off_t), and so on. We have successfully built Samba 4.x and it is working fine.

Perhaps you are thinking of systems without any 64-bit integers. I could see that could be a problem. Maybe C unions or C++ classes would offer a cleaner solution. If people have GCC, then they should also have G++.


More information about the samba-technical mailing list