Re: [PATCH] Fix allocation size for C_s_a_i_digits_to_integer

2019-11-18 Thread megane
Jani Hakala writes: > Hi, > > I found out that there seems to be two similar cases in srfi-4.scm Thanks for the great work! Attached is a patch for this. >From 804f461b413a49ff5021f742ba289f12d282144b Mon Sep 17 00:00:00 2001 From: megane Date: Mon, 18 Nov 2019 16:02:20 +0200 Subject:

Re: [PATCH] Fix allocation size for C_s_a_i_digits_to_integer

2019-11-17 Thread Jani Hakala
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

[PATCH] Fix allocation size for C_s_a_i_digits_to_integer

2019-11-17 Thread Peter Bex
ba1253332d42e1296513d29ac85d201fab9c8e46 Mon Sep 17 00:00:00 2001 From: Peter Bex Date: Sun, 17 Nov 2019 12:54:19 +0100 Subject: [PATCH] Fix allocation size for C_s_a_i_digits_to_integer Found by jjhoo using Valgrind: C_bignum2 needs 4 words (header, sign and the two digit words), plus the 2 words for the bignum wrapper