[Top][All Lists]

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

Problem with truncated string ports

From: Brent Pinkney
Subject: Problem with truncated string ports
Date: Fri, 21 Jun 2013 15:44:50 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130510 Thunderbird/17.0.6


We are using guile on Solaris 10u10 on x86 hardware and are experiencing odd behaviour with (format #f "~s" foo), where foo is
    1. a string containing #\" quotation characters,
    2. ~9000 bytes long.

The faulty behaviour is that the resulting string is truncated to 4096 bytes every time. However, the problem does not occur in the guile REPL, nor in any guise on Solaris SPARC or Linux x86.

Further investigation using string ports and write confirms that the problem can be reproduced with

    (define s (make-string 9000 #\"))
    (define o (open-output-string))
    (write s o)
    (define r (get-output-string o))
    (string-length r)                                    ; answers 4096

I have inspected the strings.c implementation but nothing obvious suggests why the output string is truncated to 4096 bytes.

Can anyone assist ?



reply via email to

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