[CRIU] [PATCH] proc_parse: double fclose in parse_fdinfo

Cyrill Gorcunov gorcunov at openvz.org
Thu Apr 25 06:27:33 EDT 2013


On Thu, Apr 25, 2013 at 02:22:09PM +0400, Vasily Averin wrote:
> On 04/25/2013 02:16 PM, Cyrill Gorcunov wrote:
> > On Thu, Apr 25, 2013 at 02:04:36PM +0400, Vasily Averin wrote:
> >> "crtools check" crashes on ubuntu 12.10
> >> (00.011275) Error (proc_parse.c:1049): No records of type 6 found in fdinfo file
> >> (00.011281) Error (proc_parse.c:1052): parse_fdinfo: error parsing [flags:  02 ] for 6 : Operation not permitted
> >> *** glibc detected *** /home/vvs/devel/criu/crtools/crtools: double free or corruption (top): 0x000000000068a5a0 **
> >>
> >> Signed-off-by:  Vasily Averin <vvs at parallels.com>
> > 
> > This looks like a big hammer to me ;) I guess better to introduce
> > fclose_safe helper (as we have for close_safe()) or some shorter
> > patch as below.
> 
> it's up to you, but IMHO it's better to have resource cleanup in one place.

OK, I see. Anyway, I'm fine with either approach, so it's up to Pavel what's
to merge in.


More information about the CRIU mailing list