unofficial mirror of bug-guile@gnu.org 
 help / color / mirror / Atom feed
From: Daniel Llorens <daniel.llorens@bluewin.ch>
To: 24908@debbugs.gnu.org
Subject: bug#24908: Possible unboxing bug in master triggered by (format)
Date: Wed, 9 Nov 2016 14:17:04 +0100	[thread overview]
Message-ID: <4C4987A5-B38B-442C-935A-3AD520459602@bluewin.ch> (raw)


(format #f "~2f" 9.9) fails in master. You can try different combinations, it doesn't fail when it rounds down or there're more spaces for example.

The first bad commit is 0f2f5949a21572fad8355473200c7adc6d74f882 'Better unboxing' on the master branch.

See the full error below. 18446744073709551615 is 2^64-1 of course so it looks like bad signedness somewhere.

Regards

	Daniel


> guile -c '(use-modules (ice-9 format)) (format #f "~2f" 9.9)'
Backtrace:./meta/guile -c '(use-modules (ice-9 format)) (format #f "~2f" 9.9)'
Backtrace:
           8 (apply-smob/1 #<catch-closure 1105c20>)
In ice-9/boot-9.scm:
    704:2  7 (call-with-prompt ("prompt") #<procedure 110a060 at ic…> …)
In ice-9/eval.scm:
    608:8  6 (_ #(#(#<directory (guile-user) 110cf30>)))
In ice-9/command-line.scm:
   181:18  5 (_ #<input: string 1119f50>)
In unknown file:
           4 (eval (format #f "~2f" 9.9) #<directory (guile-user) 11…>)
In ice-9/format.scm:
  1590:19  3 (format #f "~2f" 9.9)
   316:19  2 (format:format-work "~2f" (9.9))
  1142:30  1 (format:out-fixed #f _ _)
  1525:37  0 (format:fn-round _)

ice-9/format.scm:1525:37: In procedure format:fn-round:
ice-9/format.scm:1525:37: In procedure string-ref: Value out of range: 18446744073709551615






             reply	other threads:[~2016-11-09 13:17 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-09 13:17 Daniel Llorens [this message]
2016-12-09 13:11 ` bug#24908: workaround daniel.llorens
2016-12-09 13:11   ` bug#24908: [PATCH] Workaround for bug #24908 daniel.llorens
2016-12-15 11:59 ` bug#24908: closing Daniel Llorens

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

  List information: https://www.gnu.org/software/guile/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4C4987A5-B38B-442C-935A-3AD520459602@bluewin.ch \
    --to=daniel.llorens@bluewin.ch \
    --cc=24908@debbugs.gnu.org \
    /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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).