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: 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").





reply via email to

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