This is the mail archive of the
mailing list for the libstdc++ project.
Re: Debug mode output broken
- From: Paolo Carlini <pcarlini at suse dot de>
- To: Paolo Carlini <pcarlini at suse dot de>
- Cc: Kaspar Fischer <kasparfischer at gmx dot net>, libstdc++ at gcc dot gnu dot org,Jonathan Wakely <cow at compsoc dot man dot ac dot uk>,Jonathan Wakely <jwakely at mintel dot com>
- Date: Fri, 06 Aug 2004 18:45:29 +0200
- Subject: Re: Debug mode output broken
- References: <email@example.com> <4113A6FF.firstname.lastname@example.org>
Paolo Carlini wrote:
Jonathan, everything considered (simplicity, affecting only
code not performance critical since we are in debug mode, ...) I think
that, after all,
your very first solution is the best one. If you don't hear other
the next hours please apply it after due testing. Remember, however,
to add a comment,
mentioning the special case of _M_print_string, and remove the
not needed anymore.
Actually, Jonathan, sorry but the patch is still not ok: in general it
works fine but without
the equivalent of __n in snprintf, we are always at risk of overflowing
__buf, since sprintf
stops only when it sees \0. A possible solution would be, as you said,
< __bufsize but this limitation was not present in the original code and
I don't like adding it.
We have to figure out something more involved, similar to your last
proposal, I'm afraid.