Re: Mysterious behavior with s8vector and -specialize?
Felix Winkelmann via Chicken-users <[email protected]>
| Newsgroups | gmane.lisp.scheme.chicken |
|---|---|
| Message-ID | <[email protected]> |
On Tue Nov 18, 2025 at 4:51 AM CET, Diego via Chicken-users wrote: > I was testing SRFI-160 with CHICKEN 6 and found some interesting behavior. I bisected the individual -O3 optimizations to debug the behavior, and found -specialize might be the culprit? > > Attached is a minimal reproduction example (or at least, as minimal as I could get it). Surprisingly, this behavior only seems to occur with an s8vector; all the other specialized vector types behave as expected as far as I can tell (e.g. replacing s8 with u8 in the example makes the behavior go away). > Thanks a lot! This was a bug in types.db, the specialization for s8vector-length used the wrong lolevel accessor. All numvectors have the data buffer as a slot in a structure, with the exception of u8vectors (which are equivalent to bytevectors). The specialization incorrectly assumed the direct bytevector representation. cheers, felix