From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Wolfgang J Moeller Newsgroups: gmane.lisp.guile.bugs Subject: guile 2.0.0 crash related to call-with-prompt/abort-to-prompt, & more Date: Wed, 9 Mar 2011 11:53:38 +0100 (CET) Message-ID: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Trace: dough.gmane.org 1299723768 18291 80.91.229.12 (10 Mar 2011 02:22:48 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 10 Mar 2011 02:22:48 +0000 (UTC) To: bug-guile@gnu.org Original-X-From: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Thu Mar 10 03:22:44 2011 Return-path: Envelope-to: guile-bugs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1PxVWV-0002vp-NZ for guile-bugs@m.gmane.org; Thu, 10 Mar 2011 03:22:44 +0100 Original-Received: from localhost ([127.0.0.1]:41463 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PxVWU-0003pf-Qv for guile-bugs@m.gmane.org; Wed, 09 Mar 2011 21:22:42 -0500 Original-Received: from [140.186.70.92] (port=44901 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PxH1T-0004nR-Ib for bug-guile@gnu.org; Wed, 09 Mar 2011 05:53:44 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PxH1R-0005jV-Ui for bug-guile@gnu.org; Wed, 09 Mar 2011 05:53:43 -0500 Original-Received: from mailer.gwdg.de ([134.76.10.26]:56830) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PxH1R-0005j3-Ig for bug-guile@gnu.org; Wed, 09 Mar 2011 05:53:41 -0500 Original-Received: from gwdw03.gwdg.de ([134.76.5.10]) by mailer.gwdg.de with esmtps (TLSv1:AES256-SHA:256) (Exim 4.72) (envelope-from ) id 1PxH1O-0004mr-Ap for bug-guile@gnu.org; Wed, 09 Mar 2011 11:53:38 +0100 X-Virus-Scanned: (clean) by exiscan+sophie X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4-2.6 X-Received-From: 134.76.10.26 X-Mailman-Approved-At: Wed, 09 Mar 2011 21:19:50 -0500 X-BeenThere: bug-guile@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GUILE, GNU's Ubiquitous Extension Language" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Errors-To: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.bugs:5314 Archived-At: Hi there, while essentially all of my "old" guile works with 2.0.0, I found a bug when testing CALL-WITH-PROMPT . Also some more quibbles further below. The major bug: With self-compiled GUILE 2.0.0 (as of 2011-02-16) on OpenSuSE 11.1 - both 32-bit and 64-bit - built/installed and then renamed "guile2", I observe a segfault when done loading a particular compiled file. No such error in interpreted mode. Details: moeller@linux3-$ uname -a Linux linux3 2.6.27.56-0.1-pae #1 SMP 2010-12-01 16:57:58 +0100 i686 i686 i386 GNU/Linux moeller@linux3-$ build-aux/config.guess i686-pc-linux-gnu moeller@louix-$ uname -a Linux louix 2.6.27.56-0.1-default #1 SMP 2010-12-01 16:57:58 +0100 x86_64 x86_64 x86_64 GNU/Linux moeller@louix-$ ./guile-2.0.0/build-aux/config.guess x86_64-unknown-linux-gnu Unfortunately, I did "make distclean", so no "config.status'. Anyway, I installed on either machine via ./configure && make; su -c 'make install' (no options) the following packages: gc-7.1 libffi-3.0.9 libunistring-0.9.3 guile-2.0.0 =============================================================================== Transcript of session (same on 64-bit) =============================================================================== moeller@linux3-$ guile2 -q --no-auto-compile GNU Guile 2.0.0 Copyright (C) 1995-2011 Free Software Foundation, Inc. Guile comes with ABSOLUTELY NO WARRANTY; for details type `,show w'. This program is free software, and you are welcome to redistribute it under certain conditions; type `,show c' for details. Enter `,help' for help. scheme@(guile-user)> (load "/home/moeller/scm/g2crash.scm") #t ; <-- #t scheme@(guile-user)> ,cc /home/moeller/scm/g2crash.scm scheme@(guile-user)> (load "/home/moeller/scm/g2crash.scm") #t ; <-- #t Segmentation fault moeller@linux3-$ ============================================================================== File "/home/moeller/scm/g2crash.scm" ============================================================================== ;;; -*- scheme -*- ;; ;;; try reset & shift with GUILE V2 prompts ;; ;; (define-syntax reset (syntax-rules () ((_ . body) (call-with-prompt 'Reset (lambda () . body) (lambda (cont f) (f cont)))))) ;; (define-syntax shift (syntax-rules () ((_ var . body) (abort-to-prompt 'Reset (lambda (cont) ((lambda (var) (reset . body)) (lambda vals (reset (apply cont vals))))))))) ;; ;; (define (reset* thunk) (reset (thunk))) ;; (define (shift* fc) (shift c (fc c))) ;; ;; ------------------------------- Tests ;; ;;(display (+ 10 (reset (+ 2 (shift k (+ 100 (k (k 3)))))))) ;;(display " ; <-- 117") ;;(newline) ;; ;;(display (* 10 (reset (* 2 (shift g (* 5 (shift f (+ (f 1) 1)))))))) ;;(display " ; <-- 60") ;;(newline) ;; ;;(display (let ((f (lambda (x) (shift k (k (k x)))))) ;; (+ 1 (reset (+ 10 (f 100)))))) ;;(display " ; <-- 121") ;;(newline) ;; ;;;; shift f1 tests that we implement shift rather than shift0 ;;(display (reset ;; (let ((x (shift f ;; (shift f1 (f1 (cons 'a (f '()))))))) ;; (shift g x)))) ;;(display " ; <-- '(a)") ;;(newline) (reset (display (let ((x 'abcde)) (eq? x ((shift* shift*) x))))) (display " ; <-- #t") (newline) ;;(let ;; ((traverse ;; (lambda (xs) ;; (letrec ((visit ;; (lambda (xs) ;; (if (null? xs) ;; '() ;; (visit (shift* ;; (lambda (k) ;; (cons (car xs) (k (cdr xs)))))))))) ;; (reset* ;; (lambda () ;; (visit xs))))))) ;; ;; (display "Example by Olivier Danvy: ") ;; (display (traverse '(1 2 3 4 5))) ;; (display " ; <-- '(1 2 3 4 5)") ;; (newline) ;;) ;;;* =============================================================================== =============================================================================== Another *strange* mis-behaviour, discovered while running with "-q": (load ) accepts relative paths only after (activate-readline), or so ... The three commands that I'm typing in the following session traditionally make up my "~/.guile". =============================================================================== Transcript of session =============================================================================== moeller@linux3-$ guile2 -q --no-auto-compile GNU Guile 2.0.0 Copyright (C) 1995-2011 Free Software Foundation, Inc. Guile comes with ABSOLUTELY NO WARRANTY; for details type `,show w'. This program is free software, and you are welcome to redistribute it under certain conditions; type `,show c' for details. Enter `,help' for help. scheme@(guile-user)> (load "g2crash.scm") ERROR: In procedure primitive-load-path: ERROR: In procedure primitive-load-path: Unable to find file "./g2crash.scm" in load path Entering a new prompt. Type `,bt' for a backtrace or `,q' to continue. scheme@(guile-user) [1]> ^D scheme@(guile-user)> (use-modules (ice-9 r5rs)) scheme@(guile-user)> (load "g2crash.scm") ERROR: In procedure primitive-load-path: ERROR: In procedure primitive-load-path: Unable to find file "./g2crash.scm" in load path Entering a new prompt. Type `,bt' for a backtrace or `,q' to continue. scheme@(guile-user) [1]> ^D scheme@(guile-user)> (use-modules (ice-9 readline)) scheme@(guile-user)> (load "g2crash.scm") ERROR: In procedure primitive-load-path: ERROR: In procedure primitive-load-path: Unable to find file "./g2crash.scm" in load path Entering a new prompt. Type `,bt' for a backtrace or `,q' to continue. scheme@(guile-user) [1]> ^D scheme@(guile-user)> (activate-readline) scheme@(guile-user)> (load "g2crash.scm") #t ; <-- #t scheme@(guile-user)> moeller@linux3-$ =============================================================================== =============================================================================== Wishlist: (1) Please provide a means by which the debugger prompt (recursive REPL) can be turned off/on. Both a 'hook' (like COMMON-LISP:DEBUGGER-HOOK plus COMMON-LISP:ABORT) or a REPL command would be OK with me. I mis-type too often! [Anyway, I could not find such a means in 2.0.0]. (2) Please provide some obvious "undefine" command, since UNINTERN is gone. I'd need it only interactively, so a REPL command would be fine. Primary use, of course, would be to remove syntax definitions - alternating between syntax-based and procedure-based code ought not require a re-start of GUILE. [I believe that the effect still can be had via un-obvious use of 'deprecated' APIs]. Best regards, Wolfgang J. Moeller, Tel. +49 551 47361, wjmheenes.com 37085 Goettingen, Germany | Disclaimer: No claim intended! http://www.wjmoeller.de/ -+-------- http://www.heenes.com/