unofficial mirror of bug-guile@gnu.org 
 help / color / mirror / Atom feed
From: "Ludovic Courtès" <ludo@gnu.org>
To: Sascha Ziemann <ceving@gmail.com>
Cc: 60522-done@debbugs.gnu.org
Subject: bug#60522: make-vector takes 100% cpu if called without argument in the REPL
Date: Mon, 16 Jan 2023 15:36:54 +0100	[thread overview]
Message-ID: <87r0vulf5l.fsf@gnu.org> (raw)
In-Reply-To: <CAGUt3y7pazQ02oku5gGLgFrFu4s2dRGLk3NMk2ADur8y6jwfbA@mail.gmail.com> (Sascha Ziemann's message of "Tue, 3 Jan 2023 17:57:19 +0100")

Hi,

Sascha Ziemann <ceving@gmail.com> skribis:

> The following throws an error:
> guile -c '(make-vector)'
>
> But the evaluation of '(make-vector)' in the REPL generats just a warning:
>
> ;;; <stdin>:1:0: warning: possibly wrong number of arguments to `make-vector'
>
> and seems to enter an endless loop afterwards.

The guts of the problem is an endless loop while reducing primitives:

--8<---------------cut here---------------start------------->8---
scheme@(language tree-il primitives)> (make-call #f (make-primitive-ref #f 'make-vector) '())
$21 = #<tree-il (call (primitive make-vector))>
scheme@(language tree-il primitives)> (resolve-primitives $21 (current-module))
$22 = #<tree-il (primcall make-vector)>
scheme@(language tree-il primitives)> (expand-primcall $22)
$23 = #<tree-il (call (primitive make-vector))>
--8<---------------cut here---------------end--------------->8---

This is fixed in 51152392ef04b053e3c7b2576473df2df9d08fe0:

--8<---------------cut here---------------start------------->8---
scheme@(language tree-il primitives)> (expand-primcall $22)
$32 = #<tree-il (primcall make-vector)>
--8<---------------cut here---------------end--------------->8---

Thanks!

Ludo’.





      parent reply	other threads:[~2023-01-16 14:36 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-03 16:57 bug#60522: make-vector takes 100% cpu if called without argument in the REPL Sascha Ziemann
2023-01-03 19:08 ` tomas
2023-01-16 14:36 ` Ludovic Courtès [this message]

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=87r0vulf5l.fsf@gnu.org \
    --to=ludo@gnu.org \
    --cc=60522-done@debbugs.gnu.org \
    --cc=ceving@gmail.com \
    /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).