Csound Csound-dev Csound-tekno Search About

[Cs-dev] Memory leaks in CsoundParseOrc

Date2013-06-19 01:00
FromAndres Cabrera
Subject[Cs-dev] Memory leaks in CsoundParseOrc
AttachmentsNone  None  
Hi,

I've run the channelTest test under valgrind and it is reporting the following memory leaks. Can this be freed when csoundReset or csoundDestroy is called?

BTW is anyone having trouble pushing to the sourceforge repo? I have some fixes that I haven't been able to push.

Cheers,
Andrés

2 bytes in 1 blocks are definitely lost in loss record 1 of 1,073
  in csp_orc_sa_instr_add_tree in Engine/cs_par_orc_semantic_analysis.c:267
  1: malloc in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so
  2: strdup in /build/buildd/eglibc-2.17/string/strdup.c:42
  3: csp_orc_sa_instr_add_tree in <a href="file:///home/andres/Documents/src/csound-csound6-git/Engine/cs_par_orc_semantic_analysis.c:267" >Engine/cs_par_orc_semantic_analysis.c:267</a>
  4: csound_orcparse in <a href="file:///home/andres/Documents/src/csound-csound6-git/Engine/csound_orc.y:219" >Engine/csound_orc.y:219</a>
  5: csoundParseOrc in <a href="file:///home/andres/Documents/src/csound-csound6-git/Engine/new_orc_parser.c:148" >Engine/new_orc_parser.c:148</a>
  6: csoundCompileOrc in <a href="file:///home/andres/Documents/src/csound-csound6-git/Engine/csound_orc_compile.c:1603" >Engine/csound_orc_compile.c:1603</a>
  7: test_channel_list in <a href="file:///home/andres/Documents/src/csound-csound6-git/tests/c/channel_tests.c:75" >tests/c/channel_tests.c:75</a>
  8: /usr/lib/libcunit.so.1.0.1
  9: /usr/lib/libcunit.so.1.0.1
  10: CU_run_all_tests in /usr/lib/libcunit.so.1.0.1
  11: main in <a href="file:///home/andres/Documents/src/csound-csound6-git/tests/c/channel_tests.c:379" >tests/c/channel_tests.c:379</a>


Date2013-06-20 14:09
FromVictor Lazzarini
SubjectRe: [Cs-dev] Memory leaks in CsoundParseOrc
I guess the reported line should use cs_strdup() rather than strdup()?

On 19 Jun 2013, at 01:00, Andres Cabrera wrote:

> Hi,
> 
> I've run the channelTest test under valgrind and it is reporting the following memory leaks. Can this be freed when csoundReset or csoundDestroy is called?
> 
> BTW is anyone having trouble pushing to the sourceforge repo? I have some fixes that I haven't been able to push.
> 
> Cheers,
> Andrés
> 
> 2 bytes in 1 blocks are definitely lost in loss record 1 of 1,073
>   in csp_orc_sa_instr_add_tree in Engine/cs_par_orc_semantic_analysis.c:267
>   1: malloc in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so
>   2: strdup in /build/buildd/eglibc-2.17/string/strdup.c:42
>   3: csp_orc_sa_instr_add_tree in Engine/cs_par_orc_semantic_analysis.c:267
>   4: csound_orcparse in Engine/csound_orc.y:219
>   5: csoundParseOrc in Engine/new_orc_parser.c:148
>   6: csoundCompileOrc in Engine/csound_orc_compile.c:1603
>   7: test_channel_list in tests/c/channel_tests.c:75
>   8: /usr/lib/libcunit.so.1.0.1
>   9: /usr/lib/libcunit.so.1.0.1
>   10: CU_run_all_tests in /usr/lib/libcunit.so.1.0.1
>   11: main in tests/c/channel_tests.c:379
> 
> ------------------------------------------------------------------------------
> This SF.net email is sponsored by Windows:
> 
> Build for Windows Store.
> 
> http://p.sf.net/sfu/windows-dev2dev_______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel

Dr Victor Lazzarini
Senior Lecturer
Dept. of Music
NUI Maynooth Ireland
tel.: +353 1 708 3545
Victor dot Lazzarini AT nuim dot ie




------------------------------------------------------------------------------
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net