bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#8435: misuse of error ("...%d...", ...) on 64-bit hosts


From: Stefan Monnier
Subject: bug#8435: misuse of error ("...%d...", ...) on 64-bit hosts
Date: Sun, 10 Apr 2011 22:44:13 -0300
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux)

>> 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?


        Stefan





reply via email to

[Prev in Thread] Current Thread [Next in Thread]