AST memory leaks when compiled from source

26 views
Skip to first unread message

Patrick Koenig

unread,
Apr 2, 2017, 2:07:36 PM4/2/17
to Intel SPMD Program Compiler Developers
Hi,

When I download the ispc binary (v1.9.1) and compile a basic test file through valgrind there are no reported memory leaks.  However, when I compile from source (using alloy.py to download and build LLVM 3.9) and compile that same file through valgrind there are nearly 8m bytes of leaked memory.  Looking at the source code it's not clear to me where the memory allocated for the AST nodes is freed.  Is there some step that occurs when building a binary for version releases that I am missing when compiling from source?  I'm sure there is something I am overlooking or don't quite understand so if someone could point me to what I'm missing that would be incredibly helpful.

Thanks!

Matt Pharr

unread,
Apr 2, 2017, 9:10:46 PM4/2/17
to ispc...@googlegroups.com
Unless something has changed, ispc doesn't bother freeing that memory. (The thinking was that this is fine for a stand-alone executable, where everything is freed when the program exits anyway. Not such a good choice for the folks who were interested in converting ispc to a library...)

Thanks,
Matt


--
You received this message because you are subscribed to the Google Groups "Intel SPMD Program Compiler Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ispc-dev+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Dmitry Babokin

unread,
Apr 3, 2017, 12:53:00 PM4/3/17
to ispc...@googlegroups.com
Patrick,

For release builds we don't do anything special. So, I'm surprised that it behaves differently.

Dmitry.
Reply all
Reply to author
Forward
0 new messages