unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
From: Roland Orre <roland.orre@neurologic.se>
Subject: bug in array-equal?
Date: Wed, 29 Sep 2004 13:09:19 +0200	[thread overview]
Message-ID: <1096456159.14403.75.camel@localhost> (raw)

Case label scm_tc7_svect was missing in switch statement in
ramap.c (this is guile 1.7) causing stack overflow for e.g.
(array-equal? #h(1 2 3) #h(1 2 3))

	Best regards
	Roland



SCM
scm_array_equal_p (SCM ra0, SCM ra1)
{
  if (SCM_IMP (ra0) || SCM_IMP (ra1))
    callequal:return scm_equal_p (ra0, ra1);
  switch (SCM_TYP7(ra0))
    {
    default:
      goto callequal;
    case scm_tc7_bvect:
    case scm_tc7_string:
    case scm_tc7_byvect:
    case scm_tc7_uvect:
    case scm_tc7_ivect:
    case scm_tc7_svect:
    case scm_tc7_fvect:
    case scm_tc7_dvect:
    case scm_tc7_cvect:
    case scm_tc7_vector:
    case scm_tc7_wvect:
      break;
    case scm_tc7_smob:
      if (!SCM_ARRAYP (ra0))
        goto callequal;
    }
  switch (SCM_TYP7 (ra1))
    {
    default:
      goto callequal;
    case scm_tc7_bvect:
    case scm_tc7_string:
    case scm_tc7_byvect:
    case scm_tc7_uvect:
    case scm_tc7_ivect:
    case scm_tc7_svect:
    case scm_tc7_fvect:
    case scm_tc7_dvect:
    case scm_tc7_cvect:
    case scm_tc7_vector:
    case scm_tc7_wvect:
      break;
    case scm_tc7_smob:
      if (!SCM_ARRAYP (ra1))
        goto callequal;
    }
  return SCM_BOOL(raeql (ra0, SCM_BOOL_F, ra1));
}




_______________________________________________
Guile-devel mailing list
Guile-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/guile-devel


             reply	other threads:[~2004-09-29 11:09 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-09-29 11:09 Roland Orre [this message]
2004-09-29 15:51 ` bug in array-equal? Marius Vollmer

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=1096456159.14403.75.camel@localhost \
    --to=roland.orre@neurologic.se \
    /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).