GNU bug report logs - #39586
pfds 0.3 hamt-fold crashes with guile-2.0 and guile-3.0

Previous Next

Package: guile;

Reported by: Rob Browning <rlb <at> defaultvalue.org>

Date: Thu, 13 Feb 2020 06:54:02 UTC

Severity: normal

To reply to this bug, email your comments to 39586 AT debbugs.gnu.org.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-guile <at> gnu.org:
bug#39586; Package guile. (Thu, 13 Feb 2020 06:54:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Rob Browning <rlb <at> defaultvalue.org>:
New bug report received and forwarded. Copy sent to bug-guile <at> gnu.org. (Thu, 13 Feb 2020 06:54:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Rob Browning <rlb <at> defaultvalue.org>
To: bug-guile <at> gnu.org
Subject: pfds 0.3 hamt-fold crashes with guile-2.0 and guile-3.0
Date: Thu, 13 Feb 2020 00:53:17 -0600
With the current pdfs (https://github.com/ijp/pfds
454033f82dac7c0b0ea9e84eed1e8ed316487c78), the code below halts on an
rnrs record assertion failure with both guile-2.2 and guile-3.0, and I'm
wondering if I'm doing something wrong, if it might be a guile bug, or
if it's more likely an issue with pfds.

  (use-modules
   ((pfds hamts) #:prefix hamts/)
   ((srfi srfi-69) #:prefix hash/))

  (define x (hamts/hamt-set
             (hamts/hamt-set
              (hamts/hamt-set
               (hamts/make-hamt hash/hash eqv?)
               #:x 1)
              #:y 2)
             #:z 3))

  (hamts/hamt-fold (lambda (k v result) result)

It looks like the crash is in (rnrs records procedural) here:

    (if (and parent (struct-ref parent rtd-index-sealed?))
	(r6rs-raise (make-assertion-violation)))

And here's the full output:

  $ GUILE_LOAD_PATH=$(pwd)/mod guile -x .sls -s hamts-error.scm
  Backtrace:
  In ice-9/boot-9.scm:
    1736:10  8 (with-exception-handler _ _ #:unwind? _ # _)
  In unknown file:
             7 (apply-smob/0 #<thunk 563a568e6b20>)
  In ice-9/boot-9.scm:
      718:2  6 (call-with-prompt _ _ #<procedure default-prompt-handle?>)
  In ice-9/eval.scm:
      619:8  5 (_ #(#(#<directory (guile-user) 563a569b6f00>)))
  In ice-9/boot-9.scm:
     2806:4  4 (save-module-excursion _)
    4351:12  3 (_)
  In pfds/private/vectors.sls:
       62:0  2 (vector-fold #<procedure 563a568470c0 at pfds/hamts.sl?> ?)
  In pfds/hamts.sls:
      308:0  1 (_ _ #t)
  In rnrs/records/procedural.scm:
      130:2  0 (_ #(#f #f #f #f #f #f #f #f #f #f #f #f #f #f #f #f # ?))

  rnrs/records/procedural.scm:130:2: ERROR:
    1. &assertion-failure

Thanks
-- 
Rob Browning
rlb @defaultvalue.org and @debian.org
GPG as of 2011-07-10 E6A9 DA3C C9FD 1FF8 C676 D2C4 C0F0 39E9 ED1B 597A
GPG as of 2002-11-03 14DD 432F AE39 534D B592 F9A0 25C8 D377 8C7E 73A4




Information forwarded to bug-guile <at> gnu.org:
bug#39586; Package guile. (Sat, 21 Mar 2020 17:59:02 GMT) Full text and rfc822 format available.

Message #8 received at 39586 <at> debbugs.gnu.org (full text, mbox):

From: Ludovic Courtès <ludo <at> gnu.org>
To: Rob Browning <rlb <at> defaultvalue.org>
Cc: 39586 <at> debbugs.gnu.org
Subject: Re: bug#39586: pfds 0.3 hamt-fold crashes with guile-2.0 and guile-3.0
Date: Sat, 21 Mar 2020 18:58:41 +0100
Hi Rob,

Rob Browning <rlb <at> defaultvalue.org> skribis:

> With the current pdfs (https://github.com/ijp/pfds
> 454033f82dac7c0b0ea9e84eed1e8ed316487c78), the code below halts on an
> rnrs record assertion failure with both guile-2.2 and guile-3.0, and I'm
> wondering if I'm doing something wrong, if it might be a guile bug, or
> if it's more likely an issue with pfds.
>
>   (use-modules
>    ((pfds hamts) #:prefix hamts/)
>    ((srfi srfi-69) #:prefix hash/))
>
>   (define x (hamts/hamt-set
>              (hamts/hamt-set
>               (hamts/hamt-set
>                (hamts/make-hamt hash/hash eqv?)
>                #:x 1)
>               #:y 2)
>              #:z 3))
>
>   (hamts/hamt-fold (lambda (k v result) result)
>
> It looks like the crash is in (rnrs records procedural) here:
>
>     (if (and parent (struct-ref parent rtd-index-sealed?))
> 	(r6rs-raise (make-assertion-violation)))

Do you think you could boil it down to a test that does not rely on pfds?

Thanks,
Ludo’.




This bug report was last modified 4 years and 247 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.