logo       

Re: FFI:CAST segfault with gcc 3.2.2: msg#00088

lisp.clisp.general

Subject: Re: FFI:CAST segfault with gcc 3.2.2

> * In message <16023.1795.602153.905339@xxxxxxxxxxxxxxx>
> * On the subject of "[clisp-list] FFI:CAST segfault with gcc 3.2.2"
> * Sent on Fri, 11 Apr 2003 20:18:43 +0200
> * Honorable Aurelio Bignoli <a.bignoli@xxxxxxxxxxxx> writes:
>
> [5]>(with-c-var (p 'c-pointer *x*) (cast p '(c-ptr (c-array character 4))))
> Segmentation fault

I do not observe this with
gcc (GCC) 3.2.1 20021207 (Red Hat Linux 8.0 3.2.1-2)

could you please get 3.2.1 and check that this is indeed a regression in
gcc?

(def-call-out make-foreign-string (:arguments (s c-string :in :malloc-free))
(:name "ffi_identity") (:language :stdc)
(:return-type c-pointer))
(setf *x* (make-foreign-string "abcd"))

(with-c-var (p 'c-pointer *x*) (cast p '(c-ptr (c-array uint8 4))))
==> #(97 98 99 100)

(with-c-var (p 'c-pointer *x*) (cast p '(c-ptr (c-array character 4))))
==> "abcd"

(CLISP CVS head)

--
Sam Steingold (http://www.podval.org/~sds) running RedHat8 GNU/Linux
<http://www.camera.org> <http://www.iris.org.il> <http://www.memri.org/>
<http://www.mideasttruth.com/> <http://www.palestine-central.com/links.html>
I don't like cats! -- Come on, you just don't know how to cook them!


-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise