Received: (at submit) by debbugs.gnu.org; 26 Apr 2017 03:36:40 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Tue Apr 25 23:36:40 2017 Received: from localhost ([127.0.0.1]:40381 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1d3Dku-0000JG-1D for submit <at> debbugs.gnu.org; Tue, 25 Apr 2017 23:36:40 -0400 Received: from eggs.gnu.org ([208.118.235.92]:53048) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <cwebber@HIDDEN>) id 1d3Dkt-0000J2-27 for submit <at> debbugs.gnu.org; Tue, 25 Apr 2017 23:36:39 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from <cwebber@HIDDEN>) id 1d3Dkm-00026N-Hd for submit <at> debbugs.gnu.org; Tue, 25 Apr 2017 23:36:33 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50 autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:57389) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from <cwebber@HIDDEN>) id 1d3Dkm-00026J-Eb for submit <at> debbugs.gnu.org; Tue, 25 Apr 2017 23:36:32 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:44007) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from <cwebber@HIDDEN>) id 1d3Dkl-00049k-8p for bug-guile@HIDDEN; Tue, 25 Apr 2017 23:36:32 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from <cwebber@HIDDEN>) id 1d3Dki-00024h-4N for bug-guile@HIDDEN; Tue, 25 Apr 2017 23:36:31 -0400 Received: from dustycloud.org ([50.116.34.160]:56142) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from <cwebber@HIDDEN>) id 1d3Dkh-00023g-Us for bug-guile@HIDDEN; Tue, 25 Apr 2017 23:36:28 -0400 Received: from oolong (localhost [127.0.0.1]) by dustycloud.org (Postfix) with ESMTPS id D5D20265EE for <bug-guile@HIDDEN>; Tue, 25 Apr 2017 23:36:23 -0400 (EDT) User-agent: mu4e 0.9.18; emacs 25.2.1 From: Christopher Allan Webber <cwebber@HIDDEN> To: bug-guile@HIDDEN Subject: Setting break on find-tail breaks the repl Date: Tue, 25 Apr 2017 22:36:23 -0500 Message-ID: <87wpa7u9fs.fsf@HIDDEN> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.0 (----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -4.0 (----) --=-=-= Content-Type: text/plain Setting a break on find-tail breaks everything at the repl: scheme@(guile-user)> ,break find-tail Trap 2: Breakpoint at #<procedure find-tail (_ _)>. scheme@(guile-user)> (+ 1 2 3) system/vm/traps.scm:127:31: system/vm/traps.scm:127:31: In procedure <: Wrong type: #f Entering a new prompt. Type `,bt' for a backtrace or `,q' to continue. scheme@(guile-user) [1]> ,bt In system/repl/repl.scm: 158:22 3 (_) In unknown file: 2 (_) In system/vm/traps.scm: 141:10 1 (apply-hook #<frame 7fff71aee2c0>) 127:31 0 (_ _) scheme@(guile-user) [1]> Not sure why, doesn't seem to happen with some other methods I've tried... doesn't happen with map for instance. I do have a patch, though I don't entirely understand what's going on. Here's the relevant snippet of code: (define (frame-matcher proc) ;; [...] (let ((start (program-code proc)) (end (program-last-ip proc))) (lambda (frame) (let ((ip (frame-instruction-pointer frame))) (and start end (<= start ip) (< ip end)))))) For some reason, `end' was #f in this scenario, which is how things broke. Well, patch attached! --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=0001-Fix-frame-matcher-for-when-nothing-is-found-for-prog.patch From 6bd0e814801d17df04ef23480647792480c08c26 Mon Sep 17 00:00:00 2001 From: Christopher Allan Webber <cwebber@HIDDEN> Date: Tue, 25 Apr 2017 22:28:09 -0500 Subject: [PATCH] Fix frame-matcher for when nothing is found for program-last-ip. * module/system/vm/traps.scm (frame-matcher): Check for end before we compare it to anything, since it might be #f. --- module/system/vm/traps.scm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/system/vm/traps.scm b/module/system/vm/traps.scm index c4861c925..43a067a76 100644 --- a/module/system/vm/traps.scm +++ b/module/system/vm/traps.scm @@ -124,7 +124,7 @@ (end (program-last-ip proc))) (lambda (frame) (let ((ip (frame-instruction-pointer frame))) - (and (<= start ip) (< ip end)))))) + (and end (<= start ip) (< ip end)))))) ((struct? proc) (frame-matcher (procedure proc))) (else -- 2.12.2 --=-=-=--
Christopher Allan Webber <cwebber@HIDDEN>
:bug-guile@HIDDEN
.
Full text available.bug-guile@HIDDEN
:bug#26662
; Package guile
.
Full text available.
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997 nCipher Corporation Ltd,
1994-97 Ian Jackson.