Closed edward-ly closed 1 year ago
Should be improved in https://github.com/grame-cncm/faust/commit/b1c08546007752eb4a8f0502b5f4375f4c3c8bea. Can you test and report ?
After re-compiling/installing FAUST from source, yes. Thank you!
==42270== Memcheck, a memory error detector
==42270== Copyright (C) 2002-2022, and GNU GPL'd, by Julian Seward et al.
==42270== Using Valgrind-3.19.0 and LibVEX; rerun with -h for copyright info
==42270== Command: ./llvm-test
==42270==
Libfaust version : 2.54.9 (LLVM 14.0.6)
getDSPMachineTarget x86_64-pc-linux-gnu:haswell
==42270== Thread 2:
==42270== Conditional jump or move depends on uninitialised value(s)
==42270== at 0x4847D18: strlen (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==42270== by 0x4C1FEA7: std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string(char const*, std::allocator<char> const&) [clone .constprop.0] (in /usr/local/lib/libfaust.so.2.54.9)
==42270== by 0x4C27D39: initFaustDirectories(int, char const**) [clone .constprop.0] (in /usr/local/lib/libfaust.so.2.54.9)
==42270== by 0x4C317D4: createFactoryAux1(void*) (in /usr/local/lib/libfaust.so.2.54.9)
==42270== by 0x550B8FC: start_thread (pthread_create.c:442)
==42270== by 0x558CC73: clone (clone.S:100)
==42270==
getNumInputs : 0
getNumOutputs : 2
meta_declare compile_options, -lang llvm 14.0.6 -es 1 -mcd 16 -single -ftz 0 -vec -lv 0 -vs 32
meta_declare filename, score
meta_declare maths.lib/author, GRAME
meta_declare maths.lib/copyright, GRAME
meta_declare maths.lib/license, LGPL with exception
meta_declare maths.lib/name, Faust Math Library
meta_declare maths.lib/version, 2.5
meta_declare name, score
meta_declare oscillators.lib/name, Faust Oscillator Library
meta_declare oscillators.lib/version, 0.3
meta_declare platform.lib/name, Generic Platform Library
meta_declare platform.lib/version, 0.3
ui_open_horizontal_box score 1 0.500000
ui_declare foo, bar
ui_add_vertical_slider f0 110.000000 110.000000 880.000000 1.000000
ui_close_box
==42270==
==42270== HEAP SUMMARY:
==42270== in use at exit: 284,526 bytes in 2,814 blocks
==42270== total heap usage: 185,988 allocs, 183,174 frees, 51,827,153 bytes allocated
==42270==
==42270== LEAK SUMMARY:
==42270== definitely lost: 0 bytes in 0 blocks
==42270== indirectly lost: 0 bytes in 0 blocks
==42270== possibly lost: 0 bytes in 0 blocks
==42270== still reachable: 284,526 bytes in 2,814 blocks
==42270== suppressed: 0 bytes in 0 blocks
==42270== Reachable blocks (those to which a pointer was found) are not shown.
==42270== To see them, rerun with: --leak-check=full --show-leak-kinds=all
==42270==
==42270== Use --track-origins=yes to see where uninitialised values come from
==42270== For lists of detected and suppressed errors, rerun with: -s
==42270== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 0 from 0)
Thanks ! BTW what are you using libfaust for ?
It's for my academic research. I can't share much more than that just yet, but I will say that it involves compiling a ton of FAUST programs all at once, which is how I discovered the memory leaks.
Another cleanup here: https://github.com/grame-cncm/faust/commit/cc6dfca9224caf3c1b8486ec09f8649f40857641
I'm running Arch Linux (x86_64) with FAUST 2.54.9 (LLVM 14.0.6 backend), GCC 12.2.0, and valgrind 3.19.0 (all installed with
pacman
). I tried just compiling the C API test example withgcc -lfaust -o llvm-test tests/llvm-tests/llvm-test.c
, followed by runningvalgrind --leak-check=full ./llvm-test
. Here's the output I got: