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

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

[debbugs-tracker] bug#17466: closed (unexpected bytevector contents with


From: GNU bug Tracking System
Subject: [debbugs-tracker] bug#17466: closed (unexpected bytevector contents with get-bytevector-n)
Date: Wed, 28 May 2014 17:33:03 +0000

Your message dated Wed, 28 May 2014 19:32:22 +0200
with message-id <address@hidden>
and subject line Re: bug#17466: unexpected bytevector contents with 
get-bytevector-n
has caused the debbugs.gnu.org bug report #17466,
regarding unexpected bytevector contents with get-bytevector-n
to be marked as done.

(If you believe you have received this mail in error, please contact
address@hidden)


-- 
17466: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=17466
GNU Bug Tracking System
Contact address@hidden with problems
--- Begin Message --- Subject: unexpected bytevector contents with get-bytevector-n Date: Sun, 11 May 2014 13:00:23 +0200 User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.5.0
concerning the following code example
--
(import (rnrs io ports) (ice-9 pretty-print))
(define (problem-part port) (pretty-print (get-bytevector-n port 4096)))

(let loop ((count 100))
  (if (> count 0)
    (begin (call-with-input-string "22222222222222222222" problem-part)
(loop (- count 1)))))
__

when i run it i get output with portions like this
--
#vu8(50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50)
#vu8(0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0)
#vu8(50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50)
#vu8(50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50)
#vu8(50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50)
#vu8(50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50)
#vu8(50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50)
#vu8(50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50)
#vu8(0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0)
#vu8(50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50)
#vu8(50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50)
#vu8(50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50)
#vu8(50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50)
#vu8(50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50)
#vu8(50 50 50 50 50 50 50 50 16 224 240 0 0 0 0 0 50 50 50 50)
#vu8(50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50)
--

and i would expect the bytevector to always be the same.

this first occurred to me in a more complicated scenario where:
  - the input port is a file-port
  - pretty-print was used at first and then display instead, but the
problem persisted with a much lower frequency

system info
  guile 2.0.11
  linux 3.14.2-1-ARCH x86_64



--- End Message ---
--- Begin Message --- Subject: Re: bug#17466: unexpected bytevector contents with get-bytevector-n Date: Wed, 28 May 2014 19:32:22 +0200 User-agent: Gnus/5.130009 (Ma Gnus v0.9) Emacs/24.3 (gnu/linux)
This is fixed by commit 1baa215, which will be in Guile 2.0.12.

It turns out that when shrinking a bytevector, as happens before
‘get-bytevector-n’ returns, the pointer to the bytevector’s contents
would not be left pointing to the old bytevector.  When that old
bytevector was eventually reclaimed, anything could happen.

Thanks!

Ludo’.


--- End Message ---

reply via email to

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