From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: ludo@gnu.org (Ludovic =?iso-8859-1?Q?Court=E8s?=) Newsgroups: gmane.lisp.guile.devel Subject: Re: segfault in SRFI-1 partition on non-list input Date: Mon, 28 Apr 2008 17:28:46 +0200 Message-ID: <87od7u0zip.fsf@gnu.org> References: <2bc5f8210804272137he4b80e0v314cefc34eb327d1@mail.gmail.com> <87bq3ul6yd.fsf@gnu.org> <2bc5f8210804280641r1c51a266x52883da55d882a3b@mail.gmail.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1209396805 29594 80.91.229.12 (28 Apr 2008 15:33:25 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 28 Apr 2008 15:33:25 +0000 (UTC) To: guile-devel@gnu.org Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Mon Apr 28 17:34:00 2008 connect(): Connection refused Return-path: Envelope-to: guile-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1JqVLJ-0003eV-3i for guile-devel@m.gmane.org; Mon, 28 Apr 2008 17:32:37 +0200 Original-Received: from localhost ([127.0.0.1]:46267 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JqVKc-0003oV-I3 for guile-devel@m.gmane.org; Mon, 28 Apr 2008 11:31:54 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JqVIA-0000pa-JA for guile-devel@gnu.org; Mon, 28 Apr 2008 11:29:22 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JqVI4-0000fq-Bf for guile-devel@gnu.org; Mon, 28 Apr 2008 11:29:21 -0400 Original-Received: from [199.232.76.173] (port=49071 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JqVI3-0000fY-Rt for guile-devel@gnu.org; Mon, 28 Apr 2008 11:29:16 -0400 Original-Received: from main.gmane.org ([80.91.229.2] helo=ciao.gmane.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1JqVI1-0007hZ-Qe for guile-devel@gnu.org; Mon, 28 Apr 2008 11:29:16 -0400 Original-Received: from list by ciao.gmane.org with local (Exim 4.43) id 1JqVHn-0006sI-87 for guile-devel@gnu.org; Mon, 28 Apr 2008 15:28:59 +0000 Original-Received: from 193.50.110.83 ([193.50.110.83]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 28 Apr 2008 15:28:59 +0000 Original-Received: from ludo by 193.50.110.83 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 28 Apr 2008 15:28:59 +0000 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 36 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: 193.50.110.83 X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 10 =?iso-8859-1?Q?Flor=E9al?= an 216 de la =?iso-8859-1?Q?R=E9volution?= X-PGP-Key-ID: 0xEB1F5364 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 821D 815D 902A 7EAB 5CEE D120 7FBA 3D4F EB1F 5364 X-OS: i686-pc-linux-gnu User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1 (gnu/linux) Cancel-Lock: sha1:3wF70ai1OF7U9OXJ29sq0xgca8g= X-detected-kernel: by monty-python.gnu.org: Linux 2.6, seldom 2.4 (older, 4) X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.devel:7194 Archived-At: Hi, "Julian Graham" writes: > Oh, yeah, that's fine -- sorry, didn't realize that was the behavior > of SCM_VALIDATE_LIST. Just as long as it doesn't segfault any more, > I'm happy. Actually, there are many places where `SCM_VALIDATE_LIST' is used where it should be avoided. An example is SRFI-1's `member'. Try the following: (use-modules (srfi srfi-1) (ice-9 time)) (define l (make-list 1000000 0)) (time (not (not (member (car l) l)))) ;; ... versus... (time (not (not (member 0 '(0))))) Looking at SRFI-1 specifically, the spirit is apparently to phrase things in a way that allows implementations to not actually check whether arguments are proper lists when proper lists are expected (see, e.g., [0, 1]). Thanks, Ludovic. [0] http://srfi.schemers.org/srfi-1/mail-archive/msg00061.html "[I]t's unlikely that any implementation would ever enforce the proper-list typing of its list parameter." [1] http://srfi.schemers.org/srfi-1/mail-archive/msg00054.html