chicken-hackers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Chicken-hackers] [PATCH] Fix #1059


From: Mario Domenech Goulart
Subject: Re: [Chicken-hackers] [PATCH] Fix #1059
Date: Sat, 09 Nov 2013 16:02:14 +0000
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)

On Fri, 8 Nov 2013 16:52:39 +0100 Peter Bex <address@hidden> wrote:

> Salmonella discovered another potential source of problems:
> the C_c_*vector macros use C_u_i_cdr to extract the actual
> bytevector from slot 1 of a SRFI-4 vector.  This is incorrect,
> as C_u_i_cdr should only be used for extracting slot 1 from
> pair types.
>
> It's not a big deal, but it *will* cause a hard crash when
> running programs that use _nonnull_ srfi-4 vector arguments to
> foreign lambdas, when compiled under gcc with DEBUGBUILD=1.
>
> The attached patch fixes this by introducing a more generic
> accessor macro which can extract the bytevector data from any
> SRFI-4 vector type, and used this in all the specific accessors
> as well as the generic C_srfi_4_vector_or_null() macro.
>
> This patch also adds a few basic tests, as apparently we don't
> have any at all for this FFI type....

Thanks, Peter.  I pushed your patch.

Best wishes.
Mario
-- 
http://parenteses.org/mario



reply via email to

[Prev in Thread] Current Thread [Next in Thread]