unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#4270: 23.1.50; strange behaviour of a preloaded code containg macro
@ 2009-08-27  1:37 Kenichi Handa
  2016-08-24  1:24 ` npostavs
  0 siblings, 1 reply; 3+ messages in thread
From: Kenichi Handa @ 2009-08-27  1:37 UTC (permalink / raw)
  To: emacs-pretest-bug

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@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





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

* bug#4270: 23.1.50; strange behaviour of a preloaded code containg macro
  2009-08-27  1:37 bug#4270: 23.1.50; strange behaviour of a preloaded code containg macro Kenichi Handa
@ 2016-08-24  1:24 ` npostavs
  2016-09-02  3:12   ` npostavs
  0 siblings, 1 reply; 3+ messages in thread
From: npostavs @ 2016-08-24  1:24 UTC (permalink / raw)
  To: Kenichi Handa; +Cc: 4270

Kenichi Handa <handa@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?





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

* bug#4270: 23.1.50; strange behaviour of a preloaded code containg macro
  2016-08-24  1:24 ` npostavs
@ 2016-09-02  3:12   ` npostavs
  0 siblings, 0 replies; 3+ messages in thread
From: npostavs @ 2016-09-02  3:12 UTC (permalink / raw)
  To: 4270

tags 4270 unreproducible
close 4270
quit

npostavs@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.





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

end of thread, other threads:[~2016-09-02  3:12 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-08-27  1:37 bug#4270: 23.1.50; strange behaviour of a preloaded code containg macro Kenichi Handa
2016-08-24  1:24 ` npostavs
2016-09-02  3:12   ` npostavs

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

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