nikademus79 / psutil

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

Incorrectly used free() in _psutil_osx.c #240

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
free(fds_pointer);
...
fdp_pointer = &fds_pointer[i];

fds_pointer is freed, then accessed.

Original issue reported on code.google.com by alexey.p...@qik.com on 23 Dec 2011 at 3:18

GoogleCodeExporter commented 8 years ago
It's for 0.4.1. There is one more similar bug in trunk.

Original comment by alexey.p...@qik.com on 23 Dec 2011 at 3:20

GoogleCodeExporter commented 8 years ago
Can you provide a patch?
@Jay: my virtualized OSX box is gone; can you look into this?

Original comment by g.rodola on 23 Dec 2011 at 7:25

GoogleCodeExporter commented 8 years ago

Original comment by jlo...@gmail.com on 23 Dec 2011 at 7:54

GoogleCodeExporter commented 8 years ago
Thanks for the report, there were two functions affected by this (incorrectly 
using free() on a pointer that was still in use later in the function. Fixed in 
r1244

Original comment by jlo...@gmail.com on 23 Dec 2011 at 7:55

GoogleCodeExporter commented 8 years ago

Original comment by g.rodola on 30 Jan 2012 at 12:19

GoogleCodeExporter commented 8 years ago
After r1244 I see a lot of these errors:

    python(910) malloc: *** error for object 0xa9a6d0: Non-aligned pointer being freed (2)
    *** set a breakpoint in malloc_error_break to debug

    python(910) malloc: *** error for object 0x1137800: double free
    *** set a breakpoint in malloc_error_break to debug

They go away if I remove the "free(fds_pointer);" lines.

Original comment by g.rodola on 16 Apr 2012 at 3:30

GoogleCodeExporter commented 8 years ago
Fixed in r1285.

Original comment by g.rodola on 16 Apr 2012 at 3:43

GoogleCodeExporter commented 8 years ago
0.5.0 is finally out. Closing out as fixed.

Original comment by g.rodola on 27 Jun 2012 at 6:54

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
Updated csets after the SVN -> Mercurial migration:
r1244 == revision c624cdc5374b
r1285 == revision 50786548c5c6

Original comment by g.rodola on 2 Mar 2013 at 12:06