Bugs item #2485339, was opened at 2009-01-04 12:13 Message generated for change (Comment added) made by nusmuk You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=478070&aid=2485339...
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: Closed
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: Cyrille Henry (nusmuk)
Date: 2009-02-18 19:50
Message: fixed in pd 0.42.4
----------------------------------------------------------------------
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...