From: Chong Yidong <cyd@stupidchicken.com>
To: Andreas Politz <politza@fh-trier.de>,
Stefan Monnier <monnier@iro.umontreal.ca>
Cc: 5710@debbugs.gnu.org
Subject: bug#5710: 23.1; Fatal error in format
Date: Sat, 13 Mar 2010 14:57:18 -0500 [thread overview]
Message-ID: <87aaucgfkx.fsf@stupidchicken.com> (raw)
In-Reply-To: <87vdd1ekt7.fsf@fh-trier.de>
> (format "%16.s" "0123456789abcdef")
>
> makes emacs abort. This reflects the following situation in editfns.c :
>
> total = 5 + 5 + 1 = 11
> field_width = 16
> precision = 0
> thissize = 0
> actual_width = 16
>
> thissize += max(0,16 - 16) = 0
> total += 0 + 4 = 15
>
> I think it is clearly a mistake to substract the width of the
> whole argument-string from the field_width, regardless of how
> much of it will actually end up in the result, depending
> on the precision mod.
Thanks. I agree with your analysis, and have checked your patch into
the trunk.
Stefan, I think it's worthwhile to include this patch in the release
branch as well, though it's not a regression (it appears to be a
longstanding bug). Aborts in `format' are not good. What's your
opinion?
prev parent reply other threads:[~2010-03-13 19:57 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-12 13:22 bug#5710: 23.1; Fatal error in format Andreas Politz
2010-03-13 19:57 ` Chong Yidong [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87aaucgfkx.fsf@stupidchicken.com \
--to=cyd@stupidchicken.com \
--cc=5710@debbugs.gnu.org \
--cc=monnier@iro.umontreal.ca \
--cc=politza@fh-trier.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.