On Tue, 2009-07-28 at 14:44 +0200, Tim Goetze wrote: > [Damon Chaplin] > >caps memory errors in 3 plugins > > Thanks for pointing out the make invocation. I haven't used valgrind > before so my cluelessness may show again in what follows. > > Anyway, when running this: > > $ valgrind --tool=memcheck --leak-check=full --show-reachable=yes > ./test-ladspa -p caps > > I see this in the final summary: > > ==12021== ERROR SUMMARY: 7 errors from 7 contexts (suppressed: 33 from > 2) > > followed by a lot of what I suppose are call traces - are they? > > If they are, they all involving the g_malloc interface. However, this > interface isn't used by caps at all. > > I do see valgrind complaining about the use of an unitialised variable > in some of the plugins (not entirely impossible), but given the memory > leak summary I fail to see which plugins if any are affected.
Yes, using uninitialized values is the only problem in CAPS. Not as bad as invalid writes or reads, but often still a bug: Testing 2589: C* ToneStack - Tone stack emulation (caps.so) ==9992== Conditional jump or move depends on uninitialised value(s) ==9992== at 0x4129F9F: DSP::ToneStack::start_cycle(float**, int) (ToneStack.h:103) ==9992== by 0x414432D: void ToneStack::one_cycle<&(store_func(float*, int, float, float))>(int) (ToneStack.cc:80) ==9992== by 0x41443BF: ToneStack::run(int) (ToneStack.h:56) >From looking at the source I'd guess that the "model" variable hasn't been initialised (in dsp/ToneStack.h:103). That may or not matter. Though it's best to initialise it just to avoid the warnings. Testing 2587: C* AmpV - Tube amp (caps.so) ==9992== ==9992== Conditional jump or move depends on uninitialised value(s) ==9992== at 0x412BA10: void AmpV::one_cycle<&(store_func(float*, int, float, float)), 8>(int) (Amp.cc:349) ==9992== by 0x412BF13: AmpV::run(int) (Amp.h:317) Maybe "tone" hasn't been initialised here (Amp.cc:349). Again that might or might not matter. Testing 2592: C* AmpVTS - Tube amp + Tone stack (caps.so) ==9992== ==9992== Conditional jump or move depends on uninitialised value(s) ==9992== at 0x4129F9F: DSP::ToneStack::start_cycle(float**, int) (ToneStack.h:103) ==9992== by 0x412A622: void AmpVTS::one_cycle<&(store_func(float*, int, float, float)), 8>(int) (Amp.cc:508) ==9992== by 0x412AA0F: AmpVTS::run(int) (Amp.h:366) This seems to be the same as the first one. Damon _______________________________________________ Linux-audio-dev mailing list [email protected] http://lists.linuxaudio.org/mailman/listinfo/linux-audio-dev
