bug-guile
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#60522: make-vector takes 100% cpu if called without argument in the


From: Ludovic Courtès
Subject: bug#60522: make-vector takes 100% cpu if called without argument in the REPL
Date: Mon, 16 Jan 2023 15:36:54 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux)

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’.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]