GNU bug report logs -
#60522
make-vector takes 100% cpu if called without argument in the REPL
Previous Next
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.
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
Your message dated Mon, 16 Jan 2023 15:36:54 +0100
with message-id <87r0vulf5l.fsf <at> gnu.org>
and subject line Re: bug#60522: make-vector takes 100% cpu if called without argument in the REPL
has caused the debbugs.gnu.org bug report #60522,
regarding make-vector takes 100% cpu if called without argument in the REPL
to be marked as done.
(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)
--
60522: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=60522
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
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
[Message part 3 (message/rfc822, inline)]
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’.
This bug report was last modified 2 years and 127 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.