[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#8435: misuse of error ("...%d...", ...) on 64-bit hosts
From: |
Eli Zaretskii |
Subject: |
bug#8435: misuse of error ("...%d...", ...) on 64-bit hosts |
Date: |
Mon, 11 Apr 2011 05:54:47 +0300 |
> From: Stefan Monnier <monnier@iro.umontreal.ca>
> Cc: eggert@cs.ucla.edu, 8435@debbugs.gnu.org
> Date: Sun, 10 Apr 2011 22:44:13 -0300
>
> >> If the problematic case can be detected easily, that's good enough.
> > What would you suggest to do if we detect it? To recap, this is in
> > the context of `message' or `error' called to produce a message about
> > something.
>
> IIRC those cases correspond to programming bugs (since the change
> shifts the burden to the caller), so what needs to be done in those
> cases is to signal an "internal error in foo.c:nnn".
>
> > There are two issues:
>
> > . %c used to display a non-ASCII character, when the data points to a
> > multibyte sequence. doprnt converts the data to a wide character,
> > when it displays the message, vsnprintf does not.
>
> > . If the buffer supplied to doprnt is too small, it takes care to
> > truncate the text only on character boundaries, whereas vsnprintf
> > will not.
>
> It sounds like both cases can be caught more easily than they can be
> fixed, right?
I think both ways are comparable (if I understand correctly what you
mean by "caught").
- bug#8435: misuse of error ("...%d...", ...) on 64-bit hosts, (continued)
- bug#8435: misuse of error ("...%d...", ...) on 64-bit hosts, Eli Zaretskii, 2011/04/08
- bug#8435: misuse of error ("...%d...", ...) on 64-bit hosts, Paul Eggert, 2011/04/08
- bug#8435: misuse of error ("...%d...", ...) on 64-bit hosts, Eli Zaretskii, 2011/04/09
- bug#8435: misuse of error ("...%d...", ...) on 64-bit hosts, Paul Eggert, 2011/04/09
- bug#8435: misuse of error ("...%d...", ...) on 64-bit hosts, Eli Zaretskii, 2011/04/09
- bug#8435: misuse of error ("...%d...", ...) on 64-bit hosts, Paul Eggert, 2011/04/09
- bug#8435: misuse of error ("...%d...", ...) on 64-bit hosts, Eli Zaretskii, 2011/04/09
- bug#8435: misuse of error ("...%d...", ...) on 64-bit hosts, Stefan Monnier, 2011/04/10
- bug#8435: misuse of error ("...%d...", ...) on 64-bit hosts, Eli Zaretskii, 2011/04/10
- bug#8435: misuse of error ("...%d...", ...) on 64-bit hosts, Stefan Monnier, 2011/04/10
- bug#8435: misuse of error ("...%d...", ...) on 64-bit hosts,
Eli Zaretskii <=
- bug#8435: misuse of error ("...%d...", ...) on 64-bit hosts, Paul Eggert, 2011/04/10
- bug#8435: misuse of error ("...%d...", ...) on 64-bit hosts, Eli Zaretskii, 2011/04/09
- bug#8435: misuse of error ("...%d...", ...) on 64-bit hosts, Paul Eggert, 2011/04/09
- bug#8435: misuse of error ("...%d...", ...) on 64-bit hosts, Paul Eggert, 2011/04/08
- bug#8435: misuse of error ("...%d...", ...) on 64-bit hosts, Daniel Colascione, 2011/04/24
- bug#8435: misuse of error ("...%d...", ...) on 64-bit hosts, Eli Zaretskii, 2011/04/25