>From 87d149ad7424552ac9daeafb790b4726c9632e44 Mon Sep 17 00:00:00 2001 From: Christian Kellermann Date: Sun, 27 May 2012 20:21:06 +0200 Subject: [PATCH] Only specialize string-length if type is definitely known Setting #:enforce in types.db will lead the compiler to always specialise string-length with ##sys#size, which in turn will lead to a segfault if an immediate value like #f is given. --- types.db | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/types.db b/types.db index 61a3dd1..e4941bc 100644 --- a/types.db +++ b/types.db @@ -528,7 +528,7 @@ ((fixnum char) (##sys#make-string #(1) #(2))) ((fixnum) (##sys#make-string #(1) '#\space))) -(string-length (#(procedure #:clean #:enforce) string-length (string) fixnum) +(string-length (#(procedure #:clean) string-length (string) fixnum) ((string) (##sys#size #(1)))) (string-ref (#(procedure #:clean #:enforce) string-ref (string fixnum) char) -- 1.7.6