From: Thien-Thi Nguyen <ttn@gnu.org>
To: 15370@debbugs.gnu.org
Subject: bug#15370: weirdness w/ uniform-vector-read! compat
Date: Fri, 13 Sep 2013 17:49:56 +0200 [thread overview]
Message-ID: <874n9obu1n.fsf@zigzag.favinet> (raw)
[-- Attachment #1.1: Type: text/plain, Size: 223 bytes --]
Proc ‘uniform-vector-read!’ is deprecated (ugh), and its implementation
rebased onto ‘(rnrs io ports) get-bytevector-n!’. Unfortunately, there
seems to be a glitch in the arg shuffling. Here is /tmp/foo.scm:
[-- Attachment #1.2: foo.scm --]
[-- Type: application/x-scheme, Size: 507 bytes --]
[-- Attachment #1.3: Type: text/plain, Size: 149 bytes --]
and here is a series of invocations that demonstrate the discrepency
between ‘get-bytevector-n!’ (ok) and ‘uniform-vector-read!’ (ko):
[-- Attachment #1.4: badness --]
[-- Type: text/plain, Size: 1424 bytes --]
set -x ; guile --version ; guile -s foo.scm ; guile -s foo.scm ok ; guile -s foo.scm ko
+ guile --version
guile (GNU Guile) 2.0.9
Copyright (C) 2013 Free Software Foundation, Inc.
License LGPLv3+: GNU LGPL 3 or later <http://gnu.org/licenses/lgpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
+ guile -s foo.scm
uve: #s16(0) (2)
uve: #s16(0)
+ guile -s foo.scm ok
uve: #s16(0) (2)
uve: #s16(10794)
+ guile -s foo.scm ko
uve: #s16(0) (2)
`uniform-vector-read!' is deprecated. Use `get-bytevector-n!' from
`(rnrs io ports)' instead.
Backtrace:
In ice-9/boot-9.scm:
157: 11 [catch #t #<catch-closure 8347f30> ...]
In unknown file:
?: 10 [apply-smob/1 #<catch-closure 8347f30>]
In ice-9/boot-9.scm:
63: 9 [call-with-prompt prompt0 ...]
In ice-9/eval.scm:
432: 8 [eval # #]
In ice-9/boot-9.scm:
2320: 7 [save-module-excursion #<procedure 8275ea0 at ice-9/boot-9.scm:3961:3 ()>]
3968: 6 [#<procedure 8275ea0 at ice-9/boot-9.scm:3961:3 ()>]
1645: 5 [%start-stack load-stack ...]
1650: 4 [#<procedure 83489c0 ()>]
In unknown file:
?: 3 [primitive-load "/tmp/foo.scm"]
?: 2 [call-with-input-string "****" ...]
In ice-9/eval.scm:
432: 1 [eval # #]
In unknown file:
?: 0 [uniform-vector-read! #s16(0) #<input: string 8263d20> ...]
ERROR: In procedure uniform-vector-read!:
ERROR: In procedure get-bytevector-n!: Value out of range: 4
[-- Attachment #1.5: Type: text/plain, Size: 445 bytes --]
FWIW, Guile 1.8.8 produces same output as ‘ok’ on a similar (sans the
‘use-modules’ and ‘uniform-vector-element-size’ noise) input, so i think
this situation is a regression. Am i missing something?
--
Thien-Thi Nguyen
GPG key: 4C807502
(if you're human and you know it)
read my lisp: (responsep (questions 'technical)
(not (via 'mailing-list)))
=> nil
[-- Attachment #2: Type: application/pgp-signature, Size: 197 bytes --]
next reply other threads:[~2013-09-13 15:49 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-13 15:49 Thien-Thi Nguyen [this message]
2013-10-20 8:59 ` bug#15370: weirdness w/ uniform-vector-read! compat Ian Price
[not found] ` <87iowsfd9k.fsf@zigzag.favinet>
2013-10-20 14:36 ` Ian Price
2013-10-20 17:18 ` Mark H Weaver
2013-10-20 19:30 ` Ian Price
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=874n9obu1n.fsf@zigzag.favinet \
--to=ttn@gnu.org \
--cc=15370@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).