Skip Menu |

This queue is for tickets about the Devel-LeakTrace-Fast CPAN distribution.

Report information
The Basics
Id: 29834
Status: resolved
Priority: 0/
Queue: Devel-LeakTrace-Fast

People
Owner: Nobody in particular
Requestors: badalex [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: [PATCH] fix output of filenames in leak trace
Date: Mon, 8 Oct 2007 02:10:26 -0600
To: bug-Devel-LeakTrace-Fast [...] rt.cpan.org
From: "Alex Hunsaker" <badalex [...] gmail.com>
Fix a use after free bug... pretty self explanatory I think... (patch attached as well for gmail breakage) diff -ruN Devel-LeakTrace-Fast-0.0.3.orig/tools.c Devel-LeakTrace-Fast-0.0.3/tools.c --- Devel-LeakTrace-Fast-0.0.3.orig/tools.c 2007-02-07 14:16:05.000000000 -0700 +++ Devel-LeakTrace-Fast-0.0.3/tools.c 2007-10-08 02:04:21.512107980 -0600 @@ -324,7 +324,11 @@ if (interesting_op(PL_op->op_type)) { /*fprintf(stderr, "%s, line %d\n", lastfile, lastline); */ NOTE_NEW_VARS(lastline, lastfile); - lastfile = CopFILE(cCOP); + if (lastfile) { + free(lastfile); + } + if (!(lastfile = strdup(CopFILE(cCOP)))) { + nomem(); lastline = CopLINE(cCOP); } } @@ -332,6 +336,10 @@ /*fprintf(stderr, "%s, line %d\n", lastfile, lastline); */ NOTE_NEW_VARS(lastline, lastfile); + if (lastfile) { + free(lastfile); + } + TAINT_NOT; return 0; }

Message body is not shown because sender requested not to inline it.

Subject: Re: [rt.cpan.org #29834] AutoReply: [PATCH] fix output of filenames in leak trace
Date: Mon, 8 Oct 2007 02:16:01 -0600
To: bug-Devel-LeakTrace-Fast [...] rt.cpan.org
From: "Alex Hunsaker" <badalex [...] gmail.com>
Err uh.. its a little early in the morning Fix missing closing } diff -ruN Devel-LeakTrace-Fast-0.0.3.orig/tools.c Devel-LeakTrace-Fast-0.0.3/tools.c --- Devel-LeakTrace-Fast-0.0.3.orig/tools.c 2007-02-07 14:16:05.000000000 -0700 +++ Devel-LeakTrace-Fast-0.0.3/tools.c 2007-10-08 02:12:26.609425563 -0600 @@ -324,7 +324,12 @@ if (interesting_op(PL_op->op_type)) { /*fprintf(stderr, "%s, line %d\n", lastfile, lastline); */ NOTE_NEW_VARS(lastline, lastfile); - lastfile = CopFILE(cCOP); + if (lastfile) { + free(lastfile); + } + if (!(lastfile = strdup(CopFILE(cCOP)))) { + nomem(); + } lastline = CopLINE(cCOP); } } @@ -332,6 +337,10 @@ /*fprintf(stderr, "%s, line %d\n", lastfile, lastline); */ NOTE_NEW_VARS(lastline, lastfile); + if (lastfile) { + free(lastfile); + } + TAINT_NOT; return 0; }

Message body is not shown because sender requested not to inline it.

Fixed in r4471, thanks :)