GNU bug report logs - #27617
26.0.50; cl--random-state initialized to old-style vector

Previous Next

Package: emacs;

Reported by: Christopher Wellons <wellons <at> nullprogram.com>

Date: Sat, 8 Jul 2017 13:40:02 UTC

Severity: normal

Found in version 26.0.50

Done: Paul Eggert <eggert <at> cs.ucla.edu>

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 27617 in the body.
You can then email your comments to 27617 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-gnu-emacs <at> gnu.org:
bug#27617; Package emacs. (Sat, 08 Jul 2017 13:40:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Christopher Wellons <wellons <at> nullprogram.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Sat, 08 Jul 2017 13:40:02 GMT) Full text and rfc822 format available.

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

From: Christopher Wellons <wellons <at> nullprogram.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 26.0.50; cl--random-state initialized to old-style vector
Date: Sat, 8 Jul 2017 09:39:18 -0400
The global variable cl--random-state is still being initialized to the 
old defstruct vector format. See lisp/emacs-lisp/cl-lib.el:296. This 
breaks all random number functions when the STATE argument isn't 
supplied:

   $ emacs -Q --batch -l cl-lib --eval '(cl-random 10)'
   Wrong type argument: cl--random-state, [cl--random-state-tag -1 30 ...]




Added indication that bug 27617 blocks24655 Request was from Glenn Morris <rgm <at> gnu.org> to control <at> debbugs.gnu.org. (Sat, 08 Jul 2017 22:38:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#27617; Package emacs. (Mon, 10 Jul 2017 18:57:02 GMT) Full text and rfc822 format available.

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

From: Christopher Wellons <wellons <at> nullprogram.com>
To: 27617 <at> debbugs.gnu.org
Subject: [PATCH] Fix cl--random-state initialization.
Date: Mon, 10 Jul 2017 14:56:46 -0400
Here's a trivial patch that fixes this bug.

---
  lisp/emacs-lisp/cl-lib.el | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lisp/emacs-lisp/cl-lib.el b/lisp/emacs-lisp/cl-lib.el
index 936c852526c..ea47a0562ee 100644
--- a/lisp/emacs-lisp/cl-lib.el
+++ b/lisp/emacs-lisp/cl-lib.el
@@ -294,7 +294,7 @@ cl--random-time
      v))
  
  (defvar cl--random-state
-  (vector 'cl--random-state-tag -1 30 (cl--random-time)))
+  (record 'cl--random-state -1 30 (cl--random-time)))
  
  (defconst cl-most-positive-float nil
    "The largest value that a Lisp float can hold.
-- 
2.11.0





Reply sent to Paul Eggert <eggert <at> cs.ucla.edu>:
You have taken responsibility. (Fri, 14 Jul 2017 09:51:01 GMT) Full text and rfc822 format available.

Notification sent to Christopher Wellons <wellons <at> nullprogram.com>:
bug acknowledged by developer. (Fri, 14 Jul 2017 09:51:02 GMT) Full text and rfc822 format available.

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

From: Paul Eggert <eggert <at> cs.ucla.edu>
To: Christopher Wellons <wellons <at> nullprogram.com>
Cc: 27617-done <at> debbugs.gnu.org
Subject: Re: 26.0.50; cl--random-state initialized to old-style vector
Date: Fri, 14 Jul 2017 02:50:40 -0700
[Message part 1 (text/plain, inline)]
Thanks for reporting that. I installed the attached, which differs from what you 
suggested but should also work.
[0001-Remove-duplicate-cl-random-state-definition.patch (text/x-patch, attachment)]

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Fri, 11 Aug 2017 11:24:03 GMT) Full text and rfc822 format available.

This bug report was last modified 7 years and 318 days ago.

Previous Next


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