charm AT lists.siebelschool.illinois.edu
Subject: Charm++ parallel programming system
List archive
Re: [charm] [ppl] [PATCH] A printf-format bug fixed in Ck streams implementation.
Chronological Thread
- From: Phil Miller <mille121 AT illinois.edu>
- To: Artem Shvorin <shvorin AT gmail.com>
- Cc: charm AT cs.uiuc.edu
- Subject: Re: [charm] [ppl] [PATCH] A printf-format bug fixed in Ck streams implementation.
- Date: Tue, 3 May 2011 09:53:30 -0500
- List-archive: <http://lists.cs.uiuc.edu/pipermail/charm>
- List-id: CHARM parallel programming system <charm.cs.uiuc.edu>
Artem,
Thanks for reporting the bug, and submitting a patch. This is exactly
the right place for it.
Phil
On Tue, May 3, 2011 at 09:17, Artem Shvorin
<shvorin AT gmail.com>
wrote:
> Hi!
>
> There's a bug in Ck streams implementation: it's dangerous to output '%'
> symbol via those streams. For instance, “ckout << "%s" << endl;” may cause
> segfault.
>
> I provide a trivial patch fixing the problem.
>
> PS. I wonder if this mail list Is the right place to send reports/fixes. Is
> it OK to use “git format-patch” for creating patches?
>
> ---
> src/ck-core/ckstream.h | 4 ++--
> 1 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/src/ck-core/ckstream.h b/src/ck-core/ckstream.h
> index b907893..04fed7c 100644
> --- a/src/ck-core/ckstream.h
> +++ b/src/ck-core/ckstream.h
> @@ -35,9 +35,9 @@ class _CkOStream {
> _CkOStream& endl(void) {
> strcat(_obuf, "\n");
> if(_isErr)
> - CkError(_obuf);
> + CkError("%s", _obuf);
> else
> - CkPrintf(_obuf);
> + CkPrintf("%s", _obuf);
> _obuf[0] = '\0';
> _actlen=1;
> return *this;
> --
> 1.5.6.5
>
>
>
> _______________________________________________
> charm mailing list
> charm AT cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/charm
>
> _______________________________________________
> ppl mailing list
> ppl AT cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/ppl
>
>
- [charm] [PATCH] A printf-format bug fixed in Ck streams implementation., Artem Shvorin, 05/03/2011
- Re: [charm] [ppl] [PATCH] A printf-format bug fixed in Ck streams implementation., Phil Miller, 05/03/2011
Archive powered by MHonArc 2.6.16.