From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Israelsson Tampe Newsgroups: gmane.lisp.guile.devel Subject: Mysterious bug in master Date: Sat, 10 Jan 2015 17:30:34 +0100 Message-ID: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=047d7b10cc15e94915050c4ecaaf X-Trace: ger.gmane.org 1420907451 19247 80.91.229.3 (10 Jan 2015 16:30:51 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 10 Jan 2015 16:30:51 +0000 (UTC) To: guile-devel Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Sat Jan 10 17:30:46 2015 Return-path: Envelope-to: guile-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Y9yvz-00013x-3E for guile-devel@m.gmane.org; Sat, 10 Jan 2015 17:30:43 +0100 Original-Received: from localhost ([::1]:55466 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y9yvy-0006Ut-JT for guile-devel@m.gmane.org; Sat, 10 Jan 2015 11:30:42 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:46305) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y9yvt-0006U6-VV for guile-devel@gnu.org; Sat, 10 Jan 2015 11:30:39 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Y9yvs-0005Z1-OB for guile-devel@gnu.org; Sat, 10 Jan 2015 11:30:37 -0500 Original-Received: from mail-pd0-x236.google.com ([2607:f8b0:400e:c02::236]:49056) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y9yvs-0005Yt-DE for guile-devel@gnu.org; Sat, 10 Jan 2015 11:30:36 -0500 Original-Received: by mail-pd0-f182.google.com with SMTP id p10so22890228pdj.13 for ; Sat, 10 Jan 2015 08:30:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=Xm5jyJGRtYk1A2bylrQE2iFqMKFyS2REBQK1kynIUKg=; b=SgiZur1LQhX0bPTEmL9O00ss51VrS/VJ3ADJejdnQJDm7LKKnh1lvwYiWwsBykJOVC 0ul+QaY6fjlGNuruh5dthoY+/gZClWL1PWfQHmaXNXdF1mt6qoYLsNY2529G9ois7XgX 1qp45f4u7uKbCc4HUA2C2gafVgRZuyI1le1M61uEO+3TADyOLQRBcfsjbX1ipAOKDXHp bJIe/KEwnbI5y9QrtRfkT3v2ZxIjCTY0eQrXIan3vyjrv/FBmtPbuwBOXL+vmJ3WrZLk XaYVpvl+jxpsbYHkgAGoE5WW+kL34J0rbHLP4Hcwo7914dADCB7S/GPkgbT9sRsftUyP OKiw== X-Received: by 10.68.130.4 with SMTP id oa4mr32180518pbb.95.1420907434819; Sat, 10 Jan 2015 08:30:34 -0800 (PST) Original-Received: by 10.70.50.38 with HTTP; Sat, 10 Jan 2015 08:30:34 -0800 (PST) X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2607:f8b0:400e:c02::236 X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Original-Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.devel:17632 Archived-At: --047d7b10cc15e94915050c4ecaaf Content-Type: text/plain; charset=UTF-8 Hi, esp. wingo Here is the defenition and uses of *freeze-map* in my file parse.scm, (define *freeze-map* (make-fluid (make-hash-table))) (define (clear-tokens) (fluid-set! *freeze-map* (make-hash-table))) (clear-tokens) (let ((val (hash-ref (pk 'freeze (fluid-ref *freeze-map*)) (cons* N M tok) #f)) ...) (hash-set! (fluid-ref *freeze-map*) (cons* n m tok) (list X XL N M XX ... val2))) (hash-set! (fluid-ref *freeze-map*) (cons* n m tok) val2)) (with-fluids ((*freeze-map* (pk 22 (fluid-ref *freeze-map*)))) (clear-tokens) sometimes this fails sometimes not when using the code e.g. ;;; (freeze (#f . #(() () () () () () () () () () () () () () () () () () () () () () () () () () () () () () ()))) ERROR: In procedure hash-ref: Sometimes when I comile with a change of whitespaces I can make the code run else I get this mysterious error. This is a clue that there might be a bug in 2.1, guile-log is a bit naughty so I don't want to put the blame on guile, just hint that there might be a fundamental bug in there I tracked it down to the clear-tokens function, that ,x clear-tokens assembly is 0 (assert-nargs-ee/locals 1 3) ;; 0 args, 3 locals at logic/guile-log/parser.scm:64:0 1 (toplevel-box 0 57143 36139 36137 #t);; `*freeze-map*' 6 (box-ref 0 0) 7 (toplevel-box 1 57139 36133 36121 #t);; `make-hash-table' 12 (box-ref 3 1) 13 (call 3 1) at logic/guile-log/parser.scm:65:27 15 (receive 1 3 4) 17 (module-box 2 41407 34463 41405 #t);; `(@@ (guile) fluid-set!)' 22 (box-ref 2 2) at logic/guile-log/parser.scm:65:2 23 (mov 3 2) 24 (mov 2 1) 25 (mov 1 0) 26 (mov 0 3) 27 (tail-call 3) I'm wondering if the receive value 4 is protected by the frame that is the return of make-hash-table. Regards Stefan --047d7b10cc15e94915050c4ecaaf Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Hi, esp. wingo

Here is the defenition a= nd uses of *freeze-map* in my file parse.scm,

(define *freeze-map* =C2=A0 (make-fluid (make-hash-table)))
(def= ine (clear-tokens)
=C2=A0 (fluid-set! *freeze-map* (make-hash-tab= le)))
(clear-tokens)

=C2=A0(l= et ((val (hash-ref (pk 'freeze (fluid-ref *freeze-map*))
=C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0(cons* N M tok) #f))

<= div>=C2=A0 =C2=A0 =C2=A0...)

=C2=A0(hash-set!= (fluid-ref *freeze-map*)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(c= ons* n m tok) (list X XL N M XX ... val2)))

=
=C2=A0(hash-set! (fluid-ref *freeze-map*)
=C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0(cons* n m tok) val2))

<= div>=C2=A0(with-fluids ((*freeze-map* (pk 22 (fluid-ref *freeze-map*))))
=C2=A0 =C2=A0 =C2=A0 (clear-tokens)
=C2=A0 =C2=A0 =C2=A0<= /div>

sometimes this fails sometimes not when usin= g the code e.g.
;;; (freeze (#f . #(() () () () () () () () = () () () () () () () () () () () () () () () () () () () () () () ())))
ERROR: In procedure hash-ref:

Sometim= es when I comile with a change of whitespaces I can make the code run else = I get
this mysterious error. This is a clue that there might be a= bug in 2.1, guile-log is a bit naughty
so I don't want to pu= t the blame on guile, just hint that there might be a fundamental bug in th= ere

I tracked it down to the clear-tokens function= , that ,x clear-tokens assembly is
=C2=A0 0 =C2=A0 =C2=A0(as= sert-nargs-ee/locals 1 3) =C2=A0 =C2=A0;; 0 args, 3 locals =C2=A0 at logic/= guile-log/parser.scm:64:0
=C2=A0 =C2=A01 =C2=A0 =C2=A0(toplevel-b= ox 0 57143 36139 36137 #t);; `*freeze-map*'
=C2=A0 =C2=A06 = =C2=A0 =C2=A0(box-ref 0 0) =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0=C2=A0
=C2=A0 =C2=A07 =C2=A0 =C2=A0(toplevel-box 1 = 57139 36133 36121 #t);; `make-hash-table'
=C2=A0 12 =C2=A0 = =C2=A0(box-ref 3 1) =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0=C2=A0
=C2=A0 13 =C2=A0 =C2=A0(call 3 1) =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0at logic/guil= e-log/parser.scm:65:27
=C2=A0 15 =C2=A0 =C2=A0(receive 1 3 4) =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0=C2=A0
=C2=A0= 17 =C2=A0 =C2=A0(module-box 2 41407 34463 41405 #t);; `(@@ (guile) fluid-s= et!)'
=C2=A0 22 =C2=A0 =C2=A0(box-ref 2 2) =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 at logic/guile-log/parser.= scm:65:2
=C2=A0 23 =C2=A0 =C2=A0(mov 3 2) =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0=C2=A0
=C2= =A0 24 =C2=A0 =C2=A0(mov 2 1) =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0=C2=A0
=C2=A0 25 =C2=A0 =C2=A0(mov= 1 0) =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0=C2=A0
=C2=A0 26 =C2=A0 =C2=A0(mov 0 3) =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0=C2=A0
=C2=A0 27 =C2=A0 =C2=A0(tail-call 3) =C2=A0 =C2=A0

I'm wondering if the receive value 4 is protected by the frame = that is the return of make-hash-table.

Regards
Stefan


--047d7b10cc15e94915050c4ecaaf--