baweaver / psutil

Automatically exported from code.google.com/p/psutil
Other
0 stars 0 forks source link

there is a small integer overflow bug in _psutil_linux.c #455

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?

In [2]: psutil.RLIM_INFINITY
Out[2]: -1

What is the expected output?

In [2]: psutil.RLIM_INFINITY
Out[2]: 18446744073709551615L

What version of psutil are you using? What Python version?
1.2.1

On what operating system? Is it 32bit or 64bit version?
Ubuntu 64bit

Please provide any additional information below.

It's a simple integer overflow. The constant is an unsigned long, 
PyModule_AddIntConstant accepts a signed one. I fixed it for me, patch is 
attached.

Original issue reported on code.google.com by amo...@google.com on 10 Dec 2013 at 10:05

Attachments:

GoogleCodeExporter commented 8 years ago
psutil has been migrated from Google Code to Github (see: 
http://grodola.blogspot.com/2014/05/goodbye-google-code-im-moving-to-github.html
).
Please do NOT reply here but use this instead:
https://github.com/giampaolo/psutil/issues/455

Original comment by g.rodola on 26 May 2014 at 3:07

GoogleCodeExporter commented 8 years ago
It doesn't matter what the actual value of RLIM_INFINITY is as long as it 
remains the same (as it is the case). I don't think this should be fixed.

Original comment by g.rodola on 2 Jan 2015 at 12:41