[Bug 625798] Re: Don't use int constants with a long data type.

Emmet Hikory persia at ubuntu.com
Sat Aug 28 13:47:01 BST 2010


I test-built with the upstream patch (but a slightly different debdiff)
against maverick on i386, amd64, armel, and powerpc.  In all cases, the
package built successfully, including passing all tests.

** Changed in: tickcount (Ubuntu)
       Status: New => Triaged

** Changed in: tickcount (Ubuntu)
   Importance: Undecided => Medium

-- 
Don't use int constants with a long data type.
https://bugs.launchpad.net/bugs/625798
You received this bug notification because you are a member of Ubuntu
Sponsors Team, which is a direct subscriber.

Status in Tickcount Python Extension: New
Status in “tickcount” package in Ubuntu: Triaged

Bug description:
A debug session in #ubuntu-devel initiated by Emmet Hikory for the cause of the FTBFS for powerpc, revealing a but in the tickcount code.

tickcount's C code uses "long" for the variables but uses UINT_MAX for the wrap-around computation. The same applies to the test suite for it, it also uses UINT_MAX. This works for 32bit because sizeof(int)==4==sizeof(long) but not for 64bit where sizeof(int)==4!=8==sizeof(long). Therefore on 64bit the computation is wrong and the test suite doesn't check a wrap around (as the values used fit into 64bit and no wrap-around happens).





More information about the Ubuntu-sponsors mailing list