Hello,
The 'n' passed to @vector-segment from SRFI-160 and string-segment from SRFI-152 needs to be strictly greater than zero, otherwise Gauche enters an infinite loop:
(use srfi-152)
(use srfi-160)
(string-segment "abcdefg" 0) ;; <- loop
(u8vector-segment #u8(1 2 3 4 5 6 7 8 9 10 100 200 222) 0) ;; <- loop
The SRFIs don't mention this specific case, but I suppose this case should trigger an error.
I'd provide a patch, but I'm not familiar with Gauche's source (I actually couldn't find where those procedures are implemented).