Csound Csound-dev Csound-tekno Search About

Re: [Cs-dev] csladspa segmentation fault & fix

Date2007-11-25 18:55
FromVictor Lazzarini
SubjectRe: [Cs-dev] csladspa segmentation fault & fix
But the code already checks for that, all we need
is to move the assignment. By the way, the crashes
seem to be system-dependent. The assignment of
path to NULL does not seem to crash it everywhere.

Changed the code; will commit.

Victor


>
> Thanks Felipe. I'm sure Victor will check that into the
> CVS once he gets  a chance.
>
> Rory.
>
>
> Felipe Sateler wrote:
> > Installing csladspa causes a segmentation fault on
> > ardour (and probably other  ladspa-enabled programs)
> > (when loading the ladspa plugins, of course). The  root
> of the problem is this section from CountCSD (trimmed for
> > clarity):
> > ladspa_path = getenv("LADSPA_PATH");
> > path = ladspa_path;
> >
> > The problem is that if LADSPA_PATH is unset, getenv
> > returns NULL, std::string  tries to call strlen on that
> > (of course, this depends on the std c++ lib
> implementation), and boom, crash. Safeguarding the path
> > assigning like this  fixes the issue:
> >
> >   if(ladspa_path != NULL)
> >           path = ladspa_path;
> >
> >
> >
> >
> >
> >
> ----------------------------------------------------------
> > --------------
> >
> ----------------------------------------------------------
> > --------------- This SF.net email is sponsored by:
> > Microsoft Defy all challenges. Microsoft(R) Visual
> > Studio 2005.
> > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
> >
> >
> ----------------------------------------------------------
> > --------------
> > _______________________________________________
> > Csound-devel mailing list
> > Csound-devel@lists.sourceforge.net
> >
> https://lists.sourceforge.net/lists/listinfo/csound-devel
>
> ----------------------------------------------------------
> --------------- This SF.net email is sponsored by:
> Microsoft Defy all challenges. Microsoft(R) Visual Studio
> 2005.
> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2007-11-25 21:52
FromFelipe Sateler
SubjectRe: [Cs-dev] csladspa segmentation fault & fix
AttachmentsNone  None  None