Hi,

I found out that there seems to be two similar cases in srfi-4.scm

(define u32vector-ref
  (getter-with-setter
     (lambda (x i) (##core#inline_allocate ("C_a_i_u32vector_ref" 4) x i))
     u32vector-set!
        "(chicken.srfi-4#u32vector-ref v i)"))

(define s32vector-ref
  (getter-with-setter
     (lambda (x i) (##core#inline_allocate ("C_a_i_s32vector_ref" 4) x i))
     s32vector-set!
     "(chicken.srfi-4#s32vector-ref v)))


Since C_a_i_u32vector_ref and C_a_i_s32vector_ref may end up calling
bignum1, there should probably be 5 bytes allocated instead of 4.

I found this by compiling chicken with gcc -fsanitize=address
-fsanitize=aligment, and by linking also related libraries. Address
sanitizer then reported potential problems.

Jani

Reply via email to