[PD-dev] [ pure-data-Bugs-2485339 ] pd~ crash pd when sending a big message to sub-process

2009-02-02 Thread SourceForge.net
Bugs item #2485339, was opened at 2009-01-04 12:13
Message generated for change (Comment added) made by nobody
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=478070&aid=2485339&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: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Cyrille Henry (nusmuk)
Assigned to: Miller Puckette (millerpuckette)
Summary: pd~ crash pd when sending a big message to sub-process

Initial Comment:
When a big message is send via pd~ to a sub process, pd exit with this message 
in the consol :

*** stack smashing detected ***: pd terminated
=== Backtrace: =
/lib/tls/i686/cmov/libc.so.6(__fortify_fail+0x48)[0xb7d6c138]
/lib/tls/i686/cmov/libc.so.6(__fortify_fail+0x0)[0xb7d6c0f0]
/usr/local/lib/pd/extra/pd~/pd~.pd_linux[0xb7ee5334]
/usr/local/lib/pd/extra/pd~/pd~.pd_linux[0xb7ee34ee]
[0x32203120]
=== Memory map: 
...


by exemple, a big message is about 200 to 300 number (depending on the size of 
the number).



--

Comment By: Nobody/Anonymous (nobody)
Date: 2009-02-03 03:33

Message:
... however, it's still possible to deadlock the two Pd processes by
over-stuffing the pipes -
fixing that will require much more work.

--

Comment By: Nobody/Anonymous (nobody)
Date: 2009-02-03 03:31

Message:
Fixed as follows:

diff --git a/extra/pd~/pd~.c b/extra/pd~/pd~.c
index 3cf713f..eba594c 100644
--- a/extra/pd~/pd~.c
+++ b/extra/pd~/pd~.c
@@ -466,21 +466,16 @@ static void pd_tilde_tick(t_pd_tilde *x)
 static void pd_tilde_anything(t_pd_tilde *x, t_symbol *s,
 int argc, t_atom *argv)
 {
-char msgbuf[MAXPDSTRING], *sp, *ep = msgbuf+MAXPDSTRING;
+char msgbuf[MAXPDSTRING];
 if (!x->x_outfd)
 return;
-msgbuf[0] = 0;
-strncpy(msgbuf, s->s_name, MAXPDSTRING);
-msgbuf[MAXPDSTRING-1] = 0;
-sp = msgbuf + strlen(msgbuf);
+fprintf(x->x_outfd, "%s ", s->s_name);
 while (argc--)
 {
-if (sp < ep-1)
-sp[0] = ' ', sp[1] = 0, sp++;
-atom_string(argv++, sp, ep-sp);
-sp += strlen(sp);
+atom_string(argv++, msgbuf, MAXPDSTRING);
+fprintf(x->x_outfd, "%s ", msgbuf);
 }
-fprintf(x->x_outfd, "%s;\n", msgbuf);
+fprintf(x->x_outfd, ";\n");
 }


--

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

___
Pd-dev mailing list
Pd-dev@iem.at
http://lists.puredata.info/listinfo/pd-dev


[PD-dev] [ pure-data-Bugs-2485339 ] pd~ crash pd when sending a big message to sub-process

2009-02-02 Thread SourceForge.net
Bugs item #2485339, was opened at 2009-01-04 12:13
Message generated for change (Comment added) made by nobody
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=478070&aid=2485339&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: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Cyrille Henry (nusmuk)
Assigned to: Miller Puckette (millerpuckette)
Summary: pd~ crash pd when sending a big message to sub-process

Initial Comment:
When a big message is send via pd~ to a sub process, pd exit with this message 
in the consol :

*** stack smashing detected ***: pd terminated
=== Backtrace: =
/lib/tls/i686/cmov/libc.so.6(__fortify_fail+0x48)[0xb7d6c138]
/lib/tls/i686/cmov/libc.so.6(__fortify_fail+0x0)[0xb7d6c0f0]
/usr/local/lib/pd/extra/pd~/pd~.pd_linux[0xb7ee5334]
/usr/local/lib/pd/extra/pd~/pd~.pd_linux[0xb7ee34ee]
[0x32203120]
=== Memory map: 
...


by exemple, a big message is about 200 to 300 number (depending on the size of 
the number).



--

Comment By: Nobody/Anonymous (nobody)
Date: 2009-02-03 03:31

Message:
Fixed as follows:

diff --git a/extra/pd~/pd~.c b/extra/pd~/pd~.c
index 3cf713f..eba594c 100644
--- a/extra/pd~/pd~.c
+++ b/extra/pd~/pd~.c
@@ -466,21 +466,16 @@ static void pd_tilde_tick(t_pd_tilde *x)
 static void pd_tilde_anything(t_pd_tilde *x, t_symbol *s,
 int argc, t_atom *argv)
 {
-char msgbuf[MAXPDSTRING], *sp, *ep = msgbuf+MAXPDSTRING;
+char msgbuf[MAXPDSTRING];
 if (!x->x_outfd)
 return;
-msgbuf[0] = 0;
-strncpy(msgbuf, s->s_name, MAXPDSTRING);
-msgbuf[MAXPDSTRING-1] = 0;
-sp = msgbuf + strlen(msgbuf);
+fprintf(x->x_outfd, "%s ", s->s_name);
 while (argc--)
 {
-if (sp < ep-1)
-sp[0] = ' ', sp[1] = 0, sp++;
-atom_string(argv++, sp, ep-sp);
-sp += strlen(sp);
+atom_string(argv++, msgbuf, MAXPDSTRING);
+fprintf(x->x_outfd, "%s ", msgbuf);
 }
-fprintf(x->x_outfd, "%s;\n", msgbuf);
+fprintf(x->x_outfd, ";\n");
 }


--

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

___
Pd-dev mailing list
Pd-dev@iem.at
http://lists.puredata.info/listinfo/pd-dev


[PD-dev] [ pure-data-Bugs-2555276 ] using [send] with data structures crashes Pd 0.42.2

2009-02-02 Thread SourceForge.net
Bugs item #2555276, was opened at 2009-02-01 02:40
Message generated for change (Comment added) made by lukeiannini
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=478070&aid=2555276&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: v0.42.2
Status: Open
Resolution: None
Priority: 7
Private: No
Submitted By: Nobody/Anonymous (nobody)
Assigned to: Nobody/Anonymous (nobody)
Summary: using [send] with data structures crashes Pd 0.42.2 

Initial Comment:
open pd -> help browser -> data structures
open a help patch (i tried sequencer|scaling|onoff) close it. open help browser 
-> reference -> send-help.pd
try to use the [s ] -- pd crashes.


--

Comment By: Luke Iannini (lukeiannini)
Date: 2009-02-02 18:43

Message:
Thanks to whoever made this report, it wasn't me : ).  Anyway, as this
person and Mathieu noted, it's the presence of DS that trigger the bug, so
you can disregard the multiple instances in ds-slider-o-help.pd; just one
instance will do the trick.

--

Comment By: Hans-Christoph Steiner (eighthave)
Date: 2009-02-01 13:01

Message:
Nice work isolating it! It crashed for me with Pd-0.42.2 and
Pd-0.41.4-extended on Mac OS X 10.5/Intel.  It's strange since making a
patch with just the [s] and a message doesn't crash.  I attached the patch
you posted to the pd-list since it clearly illustrates the problem.


--

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

___
Pd-dev mailing list
Pd-dev@iem.at
http://lists.puredata.info/listinfo/pd-dev


Re: [PD-dev] [declare] bug (id 2251387)

2009-02-02 Thread Luke Iannini
Yo, I've been meaning to mention forever that there's a similar issue
with datastructures.  Save a datastructure-using patch as an
abstraction, instantiate it in a parent patch, save the parent, and
you'll see template definitions from the child abstraction in the
parent.  I'll make another bug report for that...

Best
Luke

On Mon, Feb 2, 2009 at 4:42 PM, Roman Haefeli  wrote:
> hi everyone
>
> i once posted a bug to the tracker and it still appears to be there in
> version 0.42.3.
>
> since this bug is kind of viral, so that it corrupts patches invisibly
> and without being noticed by the author, and also since quite some of my
> own patches got affected by that bug, i would like to ask to raise the
> priority of this one.
>
> BEWARE:
> everyone, who was working on patches in 0.42.X, that contain
> abstractions containing [declare]'s is most likely affected, or i should
> rather say: infected.
>
> read the description here:
> http://sourceforge.net/tracker/index.php?func=detail&aid=2251387&group_id=55736&atid=478070
>
> roman
>
>
>
>
> ___
> Telefonate ohne weitere Kosten vom PC zum PC: http://messenger.yahoo.de
>
>
> ___
> Pd-dev mailing list
> Pd-dev@iem.at
> http://lists.puredata.info/listinfo/pd-dev
>

___
Pd-dev mailing list
Pd-dev@iem.at
http://lists.puredata.info/listinfo/pd-dev


[PD-dev] [declare] bug (id 2251387)

2009-02-02 Thread Roman Haefeli
hi everyone

i once posted a bug to the tracker and it still appears to be there in
version 0.42.3.

since this bug is kind of viral, so that it corrupts patches invisibly
and without being noticed by the author, and also since quite some of my
own patches got affected by that bug, i would like to ask to raise the
priority of this one. 

BEWARE:
everyone, who was working on patches in 0.42.X, that contain
abstractions containing [declare]'s is most likely affected, or i should
rather say: infected.

read the description here:
http://sourceforge.net/tracker/index.php?func=detail&aid=2251387&group_id=55736&atid=478070

roman




___ 
Telefonate ohne weitere Kosten vom PC zum PC: http://messenger.yahoo.de


___
Pd-dev mailing list
Pd-dev@iem.at
http://lists.puredata.info/listinfo/pd-dev