GNU bug report logs - #4270
23.1.50; strange behaviour of a preloaded code containg macro

Previous Next

Package: emacs;

Reported by: Kenichi Handa <handa <at> m17n.org>

Date: Thu, 27 Aug 2009 01:45:04 UTC

Severity: normal

Tags: unreproducible

Done: npostavs <at> users.sourceforge.net

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 4270 in the body.
You can then email your comments to 4270 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-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#4270; Package emacs. (Thu, 27 Aug 2009 01:45:04 GMT) Full text and rfc822 format available.

Acknowledgement sent to Kenichi Handa <handa <at> m17n.org>:
New bug report received and forwarded. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. (Thu, 27 Aug 2009 01:45:04 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Kenichi Handa <handa <at> m17n.org>
To: emacs-pretest-bug <at> gnu.org
Subject: 23.1.50; strange behaviour of a preloaded code containg macro
Date: Thu, 27 Aug 2009 10:37:21 +0900
When I put the byte-compiled site-load.el that contains the
following code in .../emacs/lisp directory, and rebuild
emacs, that file is preloaded.

;; ------------------------------------------------------------
(eval-when-compile
  (put 'testsym 'char-table-extra-slots 0)
)

(defmacro testmacro ()
  (make-char-table 'testsym))

(defvar testdata (testmacro))

(defun testfunc ()
  (cons testdata (testmacro)))
;; ------------------------------------------------------------

When I call testfunc, it returns a cons of a char-table
(correct) and an empty vector (incorrect).

When I build much more complicated char-table in testmacro,
the cdr of the return value of testfunc is an invalid lisp
object that causes segfault.

When I remove site-load.elc and rebuild emacs (site-load.el
is preloaded), everything works correctly

This happens with Emacs 22, Emacs 23.1, and the trunk.

---
Kenichi Handa
handa <at> m17n.org

In GNU Emacs 23.1.50.12 (i686-pc-linux-gnu, GTK+ Version 2.14.4)
 of 2009-07-13 on etlken
Windowing system distributor `The X.Org Foundation', version 11.0.10502000
configured using `configure  'CFLAGS=-g''

Important settings:
  value of $LC_ALL: nil
  value of $LC_COLLATE: nil
  value of $LC_CTYPE: nil
  value of $LC_MESSAGES: nil
  value of $LC_MONETARY: nil
  value of $LC_NUMERIC: nil
  value of $LC_TIME: nil
  value of $LANG: ja_JP.UTF-8
  value of $XMODIFIERS: @im=SCIM
  locale-coding-system: utf-8-unix
  default-enable-multibyte-characters: t

Major mode: Custom

Minor modes in effect:
  diff-auto-refine-mode: t
  shell-dirtrack-mode: t
  display-time-mode: t
  tooltip-mode: t
  tool-bar-mode: t
  mouse-wheel-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  global-auto-composition-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t

Recent input:
/ s e n d m <tab> <return> C-x k <return> M-x M-p M-p 
<return> M-p <return> C-x k <return> M-x c u s t o 
<tab> C-g C-x C-f ~ / . e m <tab> <return> C-s m e 
s s a g e C-s C-s C-s C-s <escape> > C-M-a C-r c u 
s t o C-a C-s m e s s a g e C-s C-s C-s C-r C-r C-a 
C-v C-v C-v <escape> < C-s h o o k C-s C-s C-s C-s 
C-s C-s C-s C-s C-s C-s C-s C-s C-s C-s C-s C-s C-a 
C-s m a i l C-a C-v C-v C-n C-n C-n C-n C-n C-n C-n 
C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n 
C-n ; ; SPC C-a C-v C-v C-n C-n C-n C-n C-n C-n C-n 
C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n ; ; 
SPC C-a C-n C-n C-n C-n C-n C-n ; ; SPC C-a C-n C-n 
C-n C-n C-n C-M-n C-a C-n C-n C-p ; ; C-a C-n C-n C-n 
C-n C-n C-n C-n C-n C-n C-n ; ; C-a C-n C-n C-u C-v 
C-u C-v C-v C-x C-s M-x c u s t o <tab> - <backspace> 
- g r <tab> <return> m a i <tab> l <tab> <return> C-h 
v m a i l <tab> C-g C-s C-a C-n C-n C-n C-n C-n C-n 
C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n 
C-n C-n C-n C-n C-n C-n C-n C-n C-n C-f <help-echo> 
<help-echo> <down-mouse-1> <mouse-1> <down-mouse-5> 
<mouse-5> <double-down-mouse-5> <double-mouse-5> <help-echo> 
<help-echo> <down-mouse-1> <mouse-1> <help-echo> <down-mouse-1> 
<help-echo> <down-mouse-4> <mouse-4> <double-down-mouse-4> 
<double-mouse-4> <triple-down-mouse-4> <triple-mouse-4> 
<triple-down-mouse-4> <triple-mouse-4> <help-echo> 
<help-echo> <help-echo> <help-echo> <help-echo> <down-mouse-1> 
<mouse-1> C-x b C-g M-x M-p M-p <return>

Recent messages:
Creating group magic...
Creating group state...
Creating group... done
Creating customization items ...done
Resetting customization items...done
Creating customization setup...done
Making completion list...
Quit
Mark set
byte-code: Beginning of buffer [2 times]
Quit

Load-path shadows:
/usr/local/share/emacs/site-lisp/ndspell hides /usr/local/share/emacs/site-lisp/lookup/ndspell
/usr/local/share/emacs/site-lisp/ndeb hides /usr/local/share/emacs/site-lisp/lookup/ndeb
/usr/local/share/emacs/site-lisp/ndtp hides /usr/local/share/emacs/site-lisp/lookup/ndtp
/usr/local/share/emacs/site-lisp/sdicf hides /usr/local/share/emacs/site-lisp/lookup/sdicf
/usr/local/share/emacs/site-lisp/lookup hides /usr/local/share/emacs/site-lisp/lookup/lookup
/usr/local/share/emacs/site-lisp/ndkks hides /usr/local/share/emacs/site-lisp/lookup/ndkks
/usr/local/share/emacs/site-lisp/ndict hides /usr/local/share/emacs/site-lisp/lookup/ndict
/usr/local/share/emacs/site-lisp/ndcookie hides /usr/local/share/emacs/site-lisp/lookup/ndcookie
/usr/local/share/emacs/site-lisp/stem-english hides /usr/local/share/emacs/site-lisp/lookup/stem-english
/usr/local/share/emacs/site-lisp/ndsrd hides /usr/local/share/emacs/site-lisp/lookup/ndsrd
/usr/local/share/emacs/site-lisp/lookup-utils hides /usr/local/share/emacs/site-lisp/lookup/lookup-utils
/usr/local/share/emacs/site-lisp/lookup-vars hides /usr/local/share/emacs/site-lisp/lookup/lookup-vars
/usr/local/share/emacs/site-lisp/lookup-types hides /usr/local/share/emacs/site-lisp/lookup/lookup-types
/usr/local/share/emacs/site-lisp/ndic hides /usr/local/share/emacs/site-lisp/lookup/ndic
/usr/local/share/emacs/site-lisp/lookup-select hides /usr/local/share/emacs/site-lisp/lookup/lookup-select
/usr/local/share/emacs/site-lisp/lookup-content hides /usr/local/share/emacs/site-lisp/lookup/lookup-content
/usr/local/share/emacs/site-lisp/rmail-mime/mime/pgg-pgp5 hides /usr/local/work/emacs/lisp/pgg-pgp5
/usr/local/share/emacs/site-lisp/rmail-mime/mime/pgg-def hides /usr/local/work/emacs/lisp/pgg-def
/usr/local/share/emacs/site-lisp/rmail-mime/mime/pgg-parse hides /usr/local/work/emacs/lisp/pgg-parse
/usr/local/share/emacs/site-lisp/rmail-mime/mime/pgg-pgp hides /usr/local/work/emacs/lisp/pgg-pgp
/usr/local/share/emacs/site-lisp/rmail-mime/mime/pgg hides /usr/local/work/emacs/lisp/pgg
/usr/local/share/emacs/site-lisp/rmail-mime/mail/sha1 hides /usr/local/work/emacs/lisp/sha1
/usr/local/share/emacs/site-lisp/rmail-mime/mail/hex-util hides /usr/local/work/emacs/lisp/hex-util
/usr/local/share/emacs/site-lisp/rmail-mime/mime/pgg-gpg hides /usr/local/work/emacs/lisp/pgg-gpg
~/gud/gud hides /usr/local/work/emacs/lisp/progmodes/gud
/usr/local/share/emacs/site-lisp/rmail-mime/mail/sasl-digest hides /usr/local/work/emacs/lisp/net/sasl-digest
/usr/local/share/emacs/site-lisp/rmail-mime/mail/hmac-md5 hides /usr/local/work/emacs/lisp/net/hmac-md5
/usr/local/share/emacs/site-lisp/rmail-mime/mail/sasl hides /usr/local/work/emacs/lisp/net/sasl
/usr/local/share/emacs/site-lisp/rmail-mime/mail/sasl-cram hides /usr/local/work/emacs/lisp/net/sasl-cram
/usr/local/share/emacs/site-lisp/rmail-mime/mail/hmac-def hides /usr/local/work/emacs/lisp/net/hmac-def
/usr/local/share/emacs/site-lisp/rmail-mime/mail/feedmail hides /usr/local/work/emacs/lisp/mail/feedmail
/usr/local/share/emacs/site-lisp/rmail-mime/mail/smtpmail hides /usr/local/work/emacs/lisp/mail/smtpmail
/usr/local/share/emacs/site-lisp/rmail-mime/mime/smime hides /usr/local/work/emacs/lisp/gnus/smime
/usr/local/work/emacs/lisp/language/thai-word hides ~/emacslisp/thai-word
/usr/local/work/emacs/lisp/textmodes/tex-mode hides ~/emacslisp/tex-mode
/usr/local/work/emacs/lisp/textmodes/table hides ~/emacslisp/table
/usr/local/work/emacs/lisp/emacs-lisp/syntax hides ~/emacslisp/syntax
/usr/local/work/emacs/lisp/progmodes/prolog hides ~/emacslisp/prolog



Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#4270; Package emacs. (Wed, 24 Aug 2016 01:24:01 GMT) Full text and rfc822 format available.

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

From: npostavs <at> users.sourceforge.net
To: Kenichi Handa <handa <at> m17n.org>
Cc: 4270 <at> debbugs.gnu.org
Subject: Re: bug#4270: 23.1.50;
 strange behaviour of a preloaded code containg macro
Date: Tue, 23 Aug 2016 21:24:01 -0400
Kenichi Handa <handa <at> m17n.org> writes:

> When I put the byte-compiled site-load.el that contains the
> following code in .../emacs/lisp directory, and rebuild
> emacs, that file is preloaded.
>
> ;; ------------------------------------------------------------
> (eval-when-compile
>   (put 'testsym 'char-table-extra-slots 0)
> )
>
> (defmacro testmacro ()
>   (make-char-table 'testsym))
>
> (defvar testdata (testmacro))
>
> (defun testfunc ()
>   (cons testdata (testmacro)))
> ;; ------------------------------------------------------------
>
> When I call testfunc, it returns a cons of a char-table
> (correct) and an empty vector (incorrect).
>
> When I build much more complicated char-table in testmacro,
> the cdr of the return value of testfunc is an invalid lisp
> object that causes segfault.
>
> When I remove site-load.elc and rebuild emacs (site-load.el
> is preloaded), everything works correctly
>
> This happens with Emacs 22, Emacs 23.1, and the trunk.

In current master, I get

Don't know how to purify: #^[nil nil testsym nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil]

while dumping (seems to have been the case since e3b83880 "*
src/alloc.c: Keep track of symbols referenced from pure space
(bug#17168)...").

So would that be considered fixed?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#4270; Package emacs. (Fri, 02 Sep 2016 03:13:01 GMT) Full text and rfc822 format available.

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

From: npostavs <at> users.sourceforge.net
To: 4270 <at> debbugs.gnu.org
Subject: Re: bug#4270: 23.1.50;
 strange behaviour of a preloaded code containg macro
Date: Thu, 01 Sep 2016 23:12:58 -0400
tags 4270 unreproducible
close 4270
quit

npostavs <at> users.sourceforge.net writes:
> In current master, I get
>
> Don't know how to purify: #^[nil nil testsym nil nil nil nil nil nil
> nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil
> nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil
> nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil
> nil nil nil nil nil nil nil nil]
>
> while dumping (seems to have been the case since e3b83880 "*
> src/alloc.c: Keep track of symbols referenced from pure space
> (bug#17168)...").
>
> So would that be considered fixed?

I will assume yes.




Added tag(s) unreproducible. Request was from npostavs <at> users.sourceforge.net to control <at> debbugs.gnu.org. (Fri, 02 Sep 2016 03:13:02 GMT) Full text and rfc822 format available.

bug closed, send any further explanations to 4270 <at> debbugs.gnu.org and Kenichi Handa <handa <at> m17n.org> Request was from npostavs <at> users.sourceforge.net to control <at> debbugs.gnu.org. (Fri, 02 Sep 2016 03:13:02 GMT) Full text and rfc822 format available.

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

This bug report was last modified 8 years and 315 days ago.

Previous Next


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