[PD-dev] [ pure-data-Patches-3307503 ] segfault in DSP-loop detection

SourceForge.net noreply at sourceforge.net
Sat Jul 30 21:50:42 CEST 2011


Patches item #3307503, was opened at 2011-05-25 06:32
Message generated for change (Comment added) made by millerpuckette
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=478072&aid=3307503&group_id=55736

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: puredata
Group: None
>Status: Pending
>Resolution: Accepted
Priority: 8
Private: No
Submitted By: IOhannes m zmölnig (zmoelnig)
Assigned to: Miller Puckette (millerpuckette)
Summary: segfault in DSP-loop detection

Initial Comment:
given a patch that contains a DSP-loop _and_ an [inlet~] _and_ and [outlet~]  (see attached patch).

if this file is opened as a toplevel patch (via File->Open) and you then turn on DSP, Pd will segfault.

if [outlet~] is missing, Pd will give an error about "DSP-loop detected" and refuses to calculate (which is ok and expected).
however, a segfault is not ok.

----------------------------------------------------------------------

>Comment By: Miller Puckette (millerpuckette)
Date: 2011-07-30 12:50

Message:
applied

----------------------------------------------------------------------

Comment By: IOhannes m zmölnig (zmoelnig)
Date: 2011-05-25 06:36

Message:
hunting down the bug i found that it crashes in the "fill borrowed outputs"
loop around d_ugen.c:1064.
the crash happens because dc_iosigs==NULL (due to the patch being run as
toplevel ) and dc_noutlets==dc_ninlets==1 (because there is inlet~ and
outlet~).

this combination leads to an access of (*dc_iosigs)->s_borrowedFrom which
is invalid (dc_iosigs==NULL)

the attached patch tries to fix the underlying problem, by forcing
dc_noutlets=dc_ninlets=0 if the toplevel flag is set.


----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=478072&aid=3307503&group_id=55736



More information about the Pd-dev mailing list