same behavior w/ C5

> On May 5, 2021, at 2:20 PM, Henry Hu <[email protected]> wrote:
> 
> Hello CHICKEN users!
> 
> I'm using CHICKEN 4.13.0 from 2017 December.  When debugging why "send eof" 
> caused our server to hang indefinitely, I found out that utf8's string-length 
> was the culprit:
> 
> ```
> $ csi
> (use utf8)
> (string-length "\377\354") ; line that was read from send eof
> ;; hangs
> ```
> 
> causes the interpreter to hang at least 30 seconds, probably indefinitely.  I 
> understand that this string isn't a valid UTF-8 codepoint, but does anyone 
> have suggestions for what to do here?  (E.g., "Upgrade to CHICKEN 5" would be 
> a nice answer.)
> 
> Some more results that make me think the \377 octal code in particular is 
> culpable:
> 
> ```
> #;4> (string-length "\354 a")
> 1 ; OK, since \354 isn't a valid UTF-8 char
> #;5> (string-length "\366 a")
> 1
> #;6> (string-length "\377 a")
> ;; Hangs
> ```
> 
> Thank you,
> Henry
> Infolab Group @ MIT
> Cambridge, MA USA


Reply via email to