[Ecls-list] BUG: SEGMENTATION-VIOLATION in code with DEFTYPE unicode char

Stas Boukarev stassats at gmail.com
Tue Nov 22 09:47:10 UTC 2011


Eric Marsden <eric.marsden at free.fr> writes:

>>>>>> "jgr" == Juan Jose Garcia-Ripoll <juanjose.garciaripoll at googlemail.com> writes:
>
>   jgr> Here is the problem: "char" in Linux is "signed char", while in OS X it
>   jgr> seems to default to "unsigned char". I have changed ECL so that BASE-CHAR
>   jgr> objects are unboxed using the explicit C type "unsigned char" to avoid such
>   jgr> ambiguities. ASA I get to a non-firewalled computer I will upload the fix.
>
>   Thanks for the fix. Here is another bug which is possibly related
>   (still on Linux/AMD64). 
>
> ,----
> | ECL (Embeddable Common-Lisp) 11.1.1 (git:78442fa7bcb4ef486b704e16d0e7cefbd4bf7680)
> | Top level.
> | > (lambda (a) (declare (type (eql "b") a)) (eql "b" a))
> | #<bytecompiled-closure #<bytecompiled-function 0000000003cc6e10>>
> | > (compile nil *)
> | ;;; OPTIMIZE levels: Safety=2, Space=0, Speed=3, Debug=0
> | ;;;
> | ;;; End of Pass 1.
> | #<compiled-function 0000000003fc6980>
> | NIL
> | NIL
> | > (funcall * "b")
> | Condition of type: TYPE-ERROR
> | "b" is not of type (EQL "b").
> `----
I don't see how that's a bug, "b" isn't required to be EQL to "b". It
can be, especially when coalesced by the compiler, but the reader
usually constructs a new string each time.

-- 
With best regards, Stas.




More information about the ecl-devel mailing list