chicken-hackers
[Top][All Lists]
Advanced

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

[Chicken-hackers] [PATCH] Make character comparisons safe


From: Peter Bex
Subject: [Chicken-hackers] [PATCH] Make character comparisons safe
Date: Fri, 20 Nov 2015 15:59:40 +0100
User-agent: Mutt/1.5.21 (2010-09-15)

Hi all,

As I found long ago, the compiler rewrites for character comparison
procedures are marked safe, but they're really unsafe.  This results
in garbage output when fed non-characters.

The attached patch changes the inline macros to actually be functions,
and renames the existing macros to C_u_i_...  This is a slight increase
in runtime.c (again...), but I think this is worthwhile to keep things
fast.  I couldn't be bothered to run the benchmarks yet again, though.

See ticket #1122 for more info.

Cheers,
Peter

Attachment: 0001-C_i_char_-p-are-now-truly-safe.chicken-5.patch
Description: Text Data

Attachment: 0001-C_i_char_-p-are-now-truly-safe.master.patch
Description: Text Data

Attachment: signature.asc
Description: Digital signature


reply via email to

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