On Mon, 2012-08-13 at 15:30 -0400, Ken Schmedding wrote:
> I put some print statements in the get memory total method.  It
> appears that the atol conversion fails at line 256
> 
> variable p (string representation of memory) is correct at 12414072
> variable total (long representation of memory) is incorrect at
> -172892160
> 
> If indeed a long is limited to 2 GB, did we not just overflow the
> variable?

long is not limited to 2 GB on 64-bit Linux systems. The main issue was
not atol() but that the multiplication by 1024 was performed as a 32-bit
integer. I've pushed a minimal fix to tracker master.

Jürg

_______________________________________________
tracker-list mailing list
tracker-list@gnome.org
https://mail.gnome.org/mailman/listinfo/tracker-list

Reply via email to