unofficial mirror of bug-guile@gnu.org 
 help / color / mirror / Atom feed
From: ludo@gnu.org (Ludovic Courtès)
To: J Kalbhenn <jkal@posteo.eu>
Cc: 17466@debbugs.gnu.org
Subject: bug#17466: unexpected bytevector contents with get-bytevector-n
Date: Wed, 28 May 2014 17:26:47 +0200	[thread overview]
Message-ID: <877g55exfs.fsf@gnu.org> (raw)
In-Reply-To: <536F5847.6060004@posteo.eu> (J. Kalbhenn's message of "Sun, 11 May 2014 13:00:23 +0200")

Hello,

J Kalbhenn <jkal@posteo.eu> 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	other threads:[~2014-05-28 15:26 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-11 11:00 bug#17466: unexpected bytevector contents with get-bytevector-n J Kalbhenn
2014-05-28 15:26 ` Ludovic Courtès [this message]
2014-05-28 17:32   ` Ludovic Courtès

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=877g55exfs.fsf@gnu.org \
    --to=ludo@gnu.org \
    --cc=17466@debbugs.gnu.org \
    --cc=jkal@posteo.eu \
    /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).