unofficial mirror of bug-guile@gnu.org 
 help / color / mirror / Atom feed
* bug#60522: make-vector takes 100% cpu if called without argument in the REPL
@ 2023-01-03 16:57 Sascha Ziemann
  2023-01-03 19:08 ` tomas
  2023-01-16 14:36 ` Ludovic Courtès
  0 siblings, 2 replies; 3+ messages in thread
From: Sascha Ziemann @ 2023-01-03 16:57 UTC (permalink / raw)
  To: 60522

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.

Environment:
$ guile --version
guile (GNU Guile) 3.0.5
Packaged by Debian (3.0.5-deb+3.0.5-4)
Copyright (C) 2021 Free Software Foundation, Inc.

License LGPLv3+: GNU LGPL 3 or later <http://gnu.org/licenses/lgpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
$ uname -a
Linux l2108 5.10.0-20-amd64 #1 SMP Debian 5.10.158-2 (2022-12-13)
x86_64 GNU/Linux





^ permalink raw reply	[flat|nested] 3+ messages in thread

* bug#60522: make-vector takes 100% cpu if called without argument in the REPL
  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
  1 sibling, 0 replies; 3+ messages in thread
From: tomas @ 2023-01-03 19:08 UTC (permalink / raw)
  To: 60522

[-- Attachment #1: Type: text/plain, Size: 457 bytes --]

On Tue, Jan 03, 2023 at 05:57:19PM +0100, Sascha Ziemann wrote:
> 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.

Can confirm for 3.0.8.57-bc3b1. It actually eats CPU, can be interrupted
with c-C.

Cheers
-- 
t
> 

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 195 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* bug#60522: make-vector takes 100% cpu if called without argument in the REPL
  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
  1 sibling, 0 replies; 3+ messages in thread
From: Ludovic Courtès @ 2023-01-16 14:36 UTC (permalink / raw)
  To: Sascha Ziemann; +Cc: 60522-done

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





^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-01-16 14:36 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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 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).