GNU bug report logs - #60522
make-vector takes 100% cpu if called without argument in the REPL

Previous Next

Package: guile;

Reported by: Sascha Ziemann <ceving <at> gmail.com>

Date: Tue, 3 Jan 2023 16:58:02 UTC

Severity: normal

Done: Ludovic Courtès <ludo <at> gnu.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 60522 in the body.
You can then email your comments to 60522 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-guile <at> gnu.org:
bug#60522; Package guile. (Tue, 03 Jan 2023 16:58:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Sascha Ziemann <ceving <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-guile <at> gnu.org. (Tue, 03 Jan 2023 16:58:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Sascha Ziemann <ceving <at> gmail.com>
To: bug-guile <at> gnu.org
Subject: make-vector takes 100% cpu if called without argument in the REPL
Date: Tue, 3 Jan 2023 17:57:19 +0100
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




Information forwarded to bug-guile <at> gnu.org:
bug#60522; Package guile. (Tue, 03 Jan 2023 19:09:02 GMT) Full text and rfc822 format available.

Message #8 received at submit <at> debbugs.gnu.org (full text, mbox):

From: <tomas <at> tuxteam.de>
To: bug-guile <at> gnu.org
Subject: Re: bug#60522: make-vector takes 100% cpu if called without argument
 in the REPL
Date: Tue, 3 Jan 2023 20:08:40 +0100
[Message part 1 (text/plain, inline)]
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
> 
[signature.asc (application/pgp-signature, inline)]

Reply sent to Ludovic Courtès <ludo <at> gnu.org>:
You have taken responsibility. (Mon, 16 Jan 2023 14:38:03 GMT) Full text and rfc822 format available.

Notification sent to Sascha Ziemann <ceving <at> gmail.com>:
bug acknowledged by developer. (Mon, 16 Jan 2023 14:38:03 GMT) Full text and rfc822 format available.

Message #13 received at 60522-done <at> debbugs.gnu.org (full text, mbox):

From: Ludovic Courtès <ludo <at> gnu.org>
To: Sascha Ziemann <ceving <at> gmail.com>
Cc: 60522-done <at> debbugs.gnu.org
Subject: Re: bug#60522: make-vector takes 100% cpu if called without
 argument in the REPL
Date: Mon, 16 Jan 2023 15:36:54 +0100
Hi,

Sascha Ziemann <ceving <at> 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’.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Tue, 14 Feb 2023 12:24:06 GMT) Full text and rfc822 format available.

This bug report was last modified 1 year and 43 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.