[Beignet] [Patch v2 1/2] reset the variables in printf_paser to NULL.
Yang, Rong R
rong.r.yang at intel.com
Tue Oct 20 01:53:38 PDT 2015
Pushed.
> -----Original Message-----
> From: Beignet [mailto:beignet-bounces at lists.freedesktop.org] On Behalf Of
> Song, Ruiling
> Sent: Tuesday, October 20, 2015 11:21
> To: Luo, Xionghu; beignet at lists.freedesktop.org
> Subject: Re: [Beignet] [Patch v2 1/2] reset the variables in printf_paser to
> NULL.
>
> OK. The patchset LGTM.
>
> Thanks!
> Ruiling
>
> > -----Original Message-----
> > From: Beignet [mailto:beignet-bounces at lists.freedesktop.org] On Behalf
> > Of Luo, Xionghu
> > Sent: Tuesday, October 20, 2015 11:19 AM
> > To: beignet at lists.freedesktop.org
> > Subject: Re: [Beignet] [Patch v2 1/2] reset the variables in printf_paser to
> NULL.
> >
> > Correct comments below.
> > "memeory leak" change to "segment fault".
> >
> > Luo Xionghu
> > Best Regards
> >
> > -----Original Message-----
> > From: Luo, Xionghu
> > Sent: Tuesday, October 20, 2015 3:11 PM
> > To: beignet at lists.freedesktop.org
> > Cc: Luo, Xionghu
> > Subject: [Patch v2 1/2] reset the variables in printf_paser to NULL.
> >
> > From: Luo Xionghu <xionghu.luo at intel.com>
> >
> > the printfPaser variables g1Xg2Xg3 and wg_offset should be reinit
> > after the builder is deleted, or else the variables will be freed and
> > caused memory leak;
> >
> > Signed-off-by: Luo Xionghu <xionghu.luo at intel.com>
> > ---
> > backend/src/llvm/llvm_printf_parser.cpp | 2 ++
> > 1 file changed, 2 insertions(+)
> >
> > diff --git a/backend/src/llvm/llvm_printf_parser.cpp
> > b/backend/src/llvm/llvm_printf_parser.cpp
> > index 1e8427c..bdaed8a 100644
> > --- a/backend/src/llvm/llvm_printf_parser.cpp
> > +++ b/backend/src/llvm/llvm_printf_parser.cpp
> > @@ -723,6 +723,8 @@ error:
> >
> > deadprintfs.clear();
> > delete builder;
> > + g1Xg2Xg3 = NULL;
> > + wg_offset = NULL;
> >
> > return changed;
> > }
> > --
> > 1.9.1
> >
> > _______________________________________________
> > Beignet mailing list
> > Beignet at lists.freedesktop.org
> > http://lists.freedesktop.org/mailman/listinfo/beignet
> _______________________________________________
> Beignet mailing list
> Beignet at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/beignet
More information about the Beignet
mailing list