unofficial mirror of bug-guile@gnu.org 
 help / color / mirror / Atom feed
From: Rob Browning <rlb@defaultvalue.org>
To: 39586@debbugs.gnu.org
Subject: bug#39586: pfds 0.3 hamt-fold crashes with guile-2.0 and guile-3.0
Date: Thu, 13 Feb 2020 00:53:17 -0600	[thread overview]
Message-ID: <87v9obx9k2.fsf@trouble.defaultvalue.org> (raw)


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





             reply	other threads:[~2020-02-13  6:53 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-13  6:53 Rob Browning [this message]
2020-03-21 17:58 ` bug#39586: pfds 0.3 hamt-fold crashes with guile-2.0 and guile-3.0 Ludovic Courtès

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/guile/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87v9obx9k2.fsf@trouble.defaultvalue.org \
    --to=rlb@defaultvalue.org \
    --cc=39586@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).