Activity log for bug #237976

Date Who What changed Old value New value Message
2008-06-06 19:02:27 Derick Eddington bug added bug
2008-06-06 19:03:25 Derick Eddington description Running the below program either raises an &i/o-decoding (but never &i/o-encoding it seems) or the read-back-in string is not equal to the original written-out string. What the program does is create a random-sized string filled with random characters, write it to a file, and read it back in and compare it. If creating such arbitrary random strings and writing them out works, shouldn't reading them work and shouldn't they always be equal for every possible random string? Playing with the value of max-string-size alters if it raises an exception or if the strings aren't equal and how long it will go before one of those happens. [This is similar to what I'm pumping through my forked-workers sockets test.] ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (import (ikarus)) (define max-string-size #e1e5) (define (make-test-string) (let ([s (make-string (+ 1 (random max-string-size)))]) (do ([i 0 (+ 1 i)]) [(fx=? i (string-length s)) s] (let loop () (let ([x (random #x110000)]) (if (fx<=? #xd800 x #xdfff) (loop) (string-set! s i (integer->char x)))))))) (define transcoder (make-transcoder (utf-8-codec) (eol-style none) (error-handling-mode raise))) (define tmp-file "/tmp/random-strings") (let loop () (let ([fop (open-file-output-port tmp-file (file-options no-fail) (buffer-mode block) transcoder)] [s (make-test-string)]) (put-string fop s) (close-output-port fop) (let ([r (call-with-port (open-file-input-port tmp-file (file-options) (buffer-mode block) transcoder) get-string-all)]) (if (string=? r s) (display ".") (assertion-violation 'check "not equal" s r)))) (loop)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Running the below program either raises an &i/o-decoding (but never &i/o-encoding it seems) or the read-back-in string is not equal to the original written-out string. What the program does is create a random-sized string filled with random characters, write it to a file, and read it back in and compare it. If creating such arbitrary random strings and writing them out works, shouldn't reading them work and shouldn't they always be equal for every possible random string? Playing with the value of max-string-size alters if it raises an exception or if the strings aren't equal and how long it will go before one of those happens. [This is similar to what I'm pumping through my forked-workers sockets test.] ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (import (ikarus)) (define max-string-size #e1e5) (define (make-test-string) (let ([s (make-string (+ 1 (random max-string-size)))]) (do ([i 0 (+ 1 i)]) [(fx=? i (string-length s)) s] (let loop () (let ([x (random #x110000)]) (if (fx<=? #xd800 x #xdfff) (loop) (string-set! s i (integer->char x)))))))) (define transcoder (make-transcoder (utf-8-codec) (eol-style none) (error-handling-mode raise))) (define tmp-file "/tmp/random-strings") (let loop () (let ([fop (open-file-output-port tmp-file (file-options no-fail) (buffer-mode block) transcoder)] [s (make-test-string)]) (put-string fop s) (close-output-port fop) (let ([r (call-with-port (open-file-input-port tmp-file (file-options) (buffer-mode block) transcoder) get-string-all)]) (if (string=? r s) (display ".") (assertion-violation 'check "not equal" s r)))) (loop)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
2008-06-07 01:14:42 Abdulaziz Ghuloum ikarus: status New Confirmed
2008-06-07 01:14:42 Abdulaziz Ghuloum ikarus: assignee aghuloum
2008-06-07 01:14:42 Abdulaziz Ghuloum ikarus: importance Undecided High
2008-06-08 13:23:46 Abdulaziz Ghuloum ikarus: status Confirmed Fix Committed
2008-06-08 20:39:03 Derick Eddington title unicode bug? refill-bv-buffer setting wrong index
2008-12-26 15:11:33 Abdulaziz Ghuloum ikarus: milestone 0.0.4