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: [email protected] Cc: Luo, Xionghu Subject: [Patch v2 1/2] reset the variables in printf_paser to NULL. From: Luo Xionghu <[email protected]> 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 <[email protected]> --- 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 [email protected] http://lists.freedesktop.org/mailman/listinfo/beignet
