bug-guile
[Top][All Lists]
Advanced

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

bug#17466: unexpected bytevector contents with get-bytevector-n


From: Ludovic Courtès
Subject: bug#17466: unexpected bytevector contents with get-bytevector-n
Date: Wed, 28 May 2014 17:26:47 +0200
User-agent: Gnus/5.130009 (Ma Gnus v0.9) Emacs/24.3 (gnu/linux)

Hello,

J Kalbhenn <address@hidden> skribis:

> (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.

Indeed.  I’ve been experiencing that in a more complex scenario too:
<http://bugs.gnu.org/17591>.

The guts of the problem seems to be GC_REALLOC.  I’m debugging it now
and your reduced test case will be helpful.

Ludo’.





reply via email to

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