Chris, I'm using a llvm_shutdown_obj object and it calls llvm_shutdown when I delete it. Do I need to call llvm_shutdown() again afterwards? It looks to me like the static object is being created after my program exits main(). From: Chris Lattner [mailto:clattner at apple.com] Sent: Friday, January 13, 2012 10:11 AM To: Villmow, Micah Cc: LLVM Developers Mailing List Subject: Re: [LLVMdev] Memory leaks in LLVM on linux On Jan 13, 2012, at 10:08 AM, Villmow, Micah wrote: Are these known issues? If so, how do I free this memory? Hi Micah, Please try calling llvm_shutdown() -Chris -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20120113/eb712b8d/attachment.html>
Also, this can be easily reproduced with the following command: valgrind --tool=memcheck --show-reachable=yes --leak-check=full --track-origins=yes --leak-check=full opt -disable-opt -O0 <some random bitcode file> Micah From: llvmdev-bounces at cs.uiuc.edu [mailto:llvmdev-bounces at cs.uiuc.edu] On Behalf Of Villmow, Micah Sent: Friday, January 13, 2012 10:23 AM To: Chris Lattner Cc: LLVM Developers Mailing List Subject: Re: [LLVMdev] Memory leaks in LLVM on linux Chris, I'm using a llvm_shutdown_obj object and it calls llvm_shutdown when I delete it. Do I need to call llvm_shutdown() again afterwards? It looks to me like the static object is being created after my program exits main(). From: Chris Lattner [mailto:clattner at apple.com] Sent: Friday, January 13, 2012 10:11 AM To: Villmow, Micah Cc: LLVM Developers Mailing List Subject: Re: [LLVMdev] Memory leaks in LLVM on linux On Jan 13, 2012, at 10:08 AM, Villmow, Micah wrote: Are these known issues? If so, how do I free this memory? Hi Micah, Please try calling llvm_shutdown() -Chris -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20120113/9cf69fe6/attachment.html>
Ping! Anyone else have an idea on how to free memory in LLVM that is created after llvm_shutdown? Micah From: llvmdev-bounces at cs.uiuc.edu [mailto:llvmdev-bounces at cs.uiuc.edu] On Behalf Of Villmow, Micah Sent: Friday, January 13, 2012 10:23 AM To: Chris Lattner Cc: LLVM Developers Mailing List Subject: Re: [LLVMdev] Memory leaks in LLVM on linux Chris, I'm using a llvm_shutdown_obj object and it calls llvm_shutdown when I delete it. Do I need to call llvm_shutdown() again afterwards? It looks to me like the static object is being created after my program exits main(). From: Chris Lattner [mailto:clattner at apple.com] Sent: Friday, January 13, 2012 10:11 AM To: Villmow, Micah Cc: LLVM Developers Mailing List Subject: Re: [LLVMdev] Memory leaks in LLVM on linux On Jan 13, 2012, at 10:08 AM, Villmow, Micah wrote: Are these known issues? If so, how do I free this memory? Hi Micah, Please try calling llvm_shutdown() -Chris -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20120116/5c75278e/attachment.html>
On Fri, Jan 13, 2012 at 10:31 PM, Villmow, Micah <Micah.Villmow at amd.com> wrote:> Also, this can be easily reproduced with the following command: > > valgrind --tool=memcheck --show-reachable=yes --leak-check=full > --track-origins=yes --leak-check=full opt -disable-opt -O0 <some random > bitcode file> > > > > Micah >Hi Micah, the --show-reachable=yes option of Valgrind is a bit too much for practical use, see http://valgrind.org/docs/manual/mc-manual.html#mc-manual.leaks These leaks are most certainly bound and can't cause major memory problems during the program execution. HTH, Alex