all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [drew.adams@oracle.com: RE: weird defadvice bug with byte-compilation]
@ 2005-12-05  2:36 Richard Stallman
  2005-12-07 18:55 ` Chong Yidong
  0 siblings, 1 reply; 46+ messages in thread
From: Richard Stallman @ 2005-12-05  2:36 UTC (permalink / raw)


Would someone please investigate this bug, and ack?
It needs to be debugged for the release.

------- Start of forwarded message -------
From: "Drew Adams" <drew.adams@oracle.com>
To: "Emacs-Pretest-Bug" <emacs-pretest-bug@gnu.org>
Date: Tue, 22 Nov 2005 09:32:25 -0800
In-Reply-To: <MEEKKIABFKKDFJMPIOEBKEHKCNAA.drew.adams@oracle.com>
X-Brightmail-Tracker: AAAAAQAAAAI=
X-Whitelist: TRUE
Subject: RE: weird defadvice bug with byte-compilation
Sender: emacs-pretest-bug-bounces+rms=gnu.org@gnu.org
X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on monty-python
X-Spam-Level: 
X-Spam-Status: No, hits=0.0 required=5.0 tests=none autolearn=no version=2.63

Not sure if anyone is looking into this bug. I know it sounds as if it's
quite particular (corner case), but I suspect that this may point to
something improper in the byte-compiler code. And it does systematically
produce a fatal error. - Drew

- ----------

    This is a weird one. I've pared it down to the bare bones, I think -
    if I comment out any part of this, the bug doesn't occur. This
    obviously comes from a larger context - when it is pared down, the
    code doesn't make much sense, of course.

    If the stuff is in the same file, or the order is different, no bug
    (error). It must be like this: two files, one of which is compiled and
    required by the other. And the requiring file must have "compile" in
    its defadvice.

    Two files:

    File 1: foo.el
    --------------

    (defvar mymap nil "")

    (let ((map (make-sparse-keymap "II")))
      (setq mymap (make-sparse-keymap))
      (define-key menu-bar-search-menu [ise]  '("" . ise))
      (put 'ise 'menu-enable '(and my-mode))
      (push (cons 'my-mode mymap) minor-mode-map-alist))

    (defadvice next-history-element (after ffff activate) "" my-mode)

    (provide 'foo)

    File 2: bar.el
    --------------

    (defconst special-display-regexps '("[ ]?[*][^*]+[*]"))

    (defvar drews-lisp-dir "C:\\drews-lisp-20" "")
    (setq load-path (append (list drews-lisp-dir) load-path))


    (defadvice occur-mode-goto-occurrence
      (around jjjjjj activate compile)
      ""
      ad-do-it)

    (require 'foo)

    Instructions:
    -------------

    1. emacs -q

    2. Byte-compile foo.el (it doesn't matter if it's compiled on Emacs 20
       or 22). `C-x C-c'.

    3. emacs -q    (Emacs 22)

    4. Visit bar.el - don't load it.

    5. Select everything in bar.el except the (require 'foo), and
    do `eval-region'.

    6. Put the cursor just after the (require 'foo) and do `C-x
    C-e'. (Don't select it and do eval-region - that doesn't
    produce the bug!)

    You will get this error backtrace:

    Debugger entered--Lisp error: (void-variable my-mode)
      (and my-mode)
      x-create-frame(((visibility) (height . 14) (width . 80)
    (unsplittable . t)))
      x-create-frame-with-faces(((height . 14) (width . 80)
    (unsplittable . t)))
      make-frame(((height . 14) (width . 80) (unsplittable . t)))
      special-display-popup-frame(#<buffer *Compile-Log*>)
      display-buffer(#<buffer *Compile-Log*>)
      display-warning(bytecomp "reference to free variable
    `my-mode'" :warning "*Compile-Log*")
      byte-compile-log-warning("reference to free variable
    `my-mode'" t :warning)
      byte-compile-warn("reference to free variable `%s'" my-mode)
      byte-compile-variable-ref(byte-varref my-mode)
      byte-compile-form(my-mode t)
      byte-compile-body(((setq ad-return-value
    (ad-Orig-next-history-element n)) my-mode ad-return-value) nil)
      byte-compile-let((let (ad-return-value) (setq ad-return-value
    (ad-Orig-next-history-element n)) my-mode ad-return-value))
      byte-compile-form((let (ad-return-value) (setq
    ad-return-value (ad-Orig-next-history-element n)) my-mode
    ad-return-value) nil)
      byte-compile-top-level((progn (let (ad-return-value) (setq
    ad-return-value ...) my-mode ad-return-value)) nil lambda)
      byte-compile-lambda((lambda (n) "$ad-doc:
    next-history-element$" (interactive "p") (let (ad-return-value)
    (setq ad-return-value ...) my-mode ad-return-value)))
      #[nil "???			\n
    \f
    \x0e\x0e??


    7. `C-x C-c'

    You will get a pop-up message with Yes/No buttons that says this:

    Emacs Abort Dialog

    "A fatal error has occurred! Would you like to attach a
    debugger? Select YES to debu, NO to abort Emacs"

    If you select Yes, you get a Window program exception and an
    invitation to send the details to Microsoft. The error report
    contents are these:

    Exception Information
    Code 0x80000003 Flags: 0x00000000
    Record: 0x0000000000000000 (didn't count 'em) Address:
    0x0000000077f75a58

    System Information
    Windows NT 5.1 Build: 2600
    CPU Vendor Code etc. blah blah blah

    Module 1
    emacs.exe
    blah blah

    Module 2
    ntdll.dll
    blah blah

    Module 3
    kernel32.dll
    blah blah

    Module 4
    msvcrt.dll
    blah blah

    etc. etc.

    ------------------------------------
    In GNU Emacs 22.0.50.1 (i386-mingw-nt5.1.2600)
     of 2005-06-26 on NONIQPC
    X server distributor `Microsoft Corp.', version 5.1.2600
    configured using `configure --with-gcc (3.3) --cflags
    -I../../jpeg-6b-3/include -I../../libpng-1.2.8/include
    -I../../tiff-3.6.1-2/include -I../../xpm-nox-4.2.0/include
    -I../../zlib-1.2.2/include'





_______________________________________________
emacs-pretest-bug mailing list
emacs-pretest-bug@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-pretest-bug
------- End of forwarded message -------

^ permalink raw reply	[flat|nested] 46+ messages in thread
* [drew.adams@oracle.com: RE: weird defadvice bug with byte-compilation]
@ 2005-11-28  4:46 Richard M. Stallman
  0 siblings, 0 replies; 46+ messages in thread
From: Richard M. Stallman @ 2005-11-28  4:46 UTC (permalink / raw)


Would someone please investigate this bug, and ack?

------- Start of forwarded message -------
From: "Drew Adams" <drew.adams@oracle.com>
To: "Emacs-Pretest-Bug" <emacs-pretest-bug@gnu.org>
Date: Tue, 22 Nov 2005 09:32:25 -0800
In-Reply-To: <MEEKKIABFKKDFJMPIOEBKEHKCNAA.drew.adams@oracle.com>
X-Brightmail-Tracker: AAAAAQAAAAI=
X-Whitelist: TRUE
Subject: RE: weird defadvice bug with byte-compilation
Sender: emacs-pretest-bug-bounces+rms=gnu.org@gnu.org
X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on monty-python
X-Spam-Level: 
X-Spam-Status: No, hits=0.0 required=5.0 tests=none autolearn=no version=2.63

Not sure if anyone is looking into this bug. I know it sounds as if it's
quite particular (corner case), but I suspect that this may point to
something improper in the byte-compiler code. And it does systematically
produce a fatal error. - Drew

- ----------

    This is a weird one. I've pared it down to the bare bones, I think -
    if I comment out any part of this, the bug doesn't occur. This
    obviously comes from a larger context - when it is pared down, the
    code doesn't make much sense, of course.

    If the stuff is in the same file, or the order is different, no bug
    (error). It must be like this: two files, one of which is compiled and
    required by the other. And the requiring file must have "compile" in
    its defadvice.

    Two files:

    File 1: foo.el
    --------------

    (defvar mymap nil "")

    (let ((map (make-sparse-keymap "II")))
      (setq mymap (make-sparse-keymap))
      (define-key menu-bar-search-menu [ise]  '("" . ise))
      (put 'ise 'menu-enable '(and my-mode))
      (push (cons 'my-mode mymap) minor-mode-map-alist))

    (defadvice next-history-element (after ffff activate) "" my-mode)

    (provide 'foo)

    File 2: bar.el
    --------------

    (defconst special-display-regexps '("[ ]?[*][^*]+[*]"))

    (defvar drews-lisp-dir "C:\\drews-lisp-20" "")
    (setq load-path (append (list drews-lisp-dir) load-path))


    (defadvice occur-mode-goto-occurrence
      (around jjjjjj activate compile)
      ""
      ad-do-it)

    (require 'foo)

    Instructions:
    -------------

    1. emacs -q

    2. Byte-compile foo.el (it doesn't matter if it's compiled on Emacs 20
       or 22). `C-x C-c'.

    3. emacs -q    (Emacs 22)

    4. Visit bar.el - don't load it.

    5. Select everything in bar.el except the (require 'foo), and
    do `eval-region'.

    6. Put the cursor just after the (require 'foo) and do `C-x
    C-e'. (Don't select it and do eval-region - that doesn't
    produce the bug!)

    You will get this error backtrace:

    Debugger entered--Lisp error: (void-variable my-mode)
      (and my-mode)
      x-create-frame(((visibility) (height . 14) (width . 80)
    (unsplittable . t)))
      x-create-frame-with-faces(((height . 14) (width . 80)
    (unsplittable . t)))
      make-frame(((height . 14) (width . 80) (unsplittable . t)))
      special-display-popup-frame(#<buffer *Compile-Log*>)
      display-buffer(#<buffer *Compile-Log*>)
      display-warning(bytecomp "reference to free variable
    `my-mode'" :warning "*Compile-Log*")
      byte-compile-log-warning("reference to free variable
    `my-mode'" t :warning)
      byte-compile-warn("reference to free variable `%s'" my-mode)
      byte-compile-variable-ref(byte-varref my-mode)
      byte-compile-form(my-mode t)
      byte-compile-body(((setq ad-return-value
    (ad-Orig-next-history-element n)) my-mode ad-return-value) nil)
      byte-compile-let((let (ad-return-value) (setq ad-return-value
    (ad-Orig-next-history-element n)) my-mode ad-return-value))
      byte-compile-form((let (ad-return-value) (setq
    ad-return-value (ad-Orig-next-history-element n)) my-mode
    ad-return-value) nil)
      byte-compile-top-level((progn (let (ad-return-value) (setq
    ad-return-value ...) my-mode ad-return-value)) nil lambda)
      byte-compile-lambda((lambda (n) "$ad-doc:
    next-history-element$" (interactive "p") (let (ad-return-value)
    (setq ad-return-value ...) my-mode ad-return-value)))
      #[nil "???			\n
    \f
    \x0e\x0e??


    7. `C-x C-c'

    You will get a pop-up message with Yes/No buttons that says this:

    Emacs Abort Dialog

    "A fatal error has occurred! Would you like to attach a
    debugger? Select YES to debu, NO to abort Emacs"

    If you select Yes, you get a Window program exception and an
    invitation to send the details to Microsoft. The error report
    contents are these:

    Exception Information
    Code 0x80000003 Flags: 0x00000000
    Record: 0x0000000000000000 (didn't count 'em) Address:
    0x0000000077f75a58

    System Information
    Windows NT 5.1 Build: 2600
    CPU Vendor Code etc. blah blah blah

    Module 1
    emacs.exe
    blah blah

    Module 2
    ntdll.dll
    blah blah

    Module 3
    kernel32.dll
    blah blah

    Module 4
    msvcrt.dll
    blah blah

    etc. etc.

    ------------------------------------
    In GNU Emacs 22.0.50.1 (i386-mingw-nt5.1.2600)
     of 2005-06-26 on NONIQPC
    X server distributor `Microsoft Corp.', version 5.1.2600
    configured using `configure --with-gcc (3.3) --cflags
    -I../../jpeg-6b-3/include -I../../libpng-1.2.8/include
    -I../../tiff-3.6.1-2/include -I../../xpm-nox-4.2.0/include
    -I../../zlib-1.2.2/include'





_______________________________________________
emacs-pretest-bug mailing list
emacs-pretest-bug@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-pretest-bug
------- End of forwarded message -------

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

end of thread, other threads:[~2005-12-17 23:59 UTC | newest]

Thread overview: 46+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-12-05  2:36 [drew.adams@oracle.com: RE: weird defadvice bug with byte-compilation] Richard Stallman
2005-12-07 18:55 ` Chong Yidong
2005-12-08  4:53   ` Richard M. Stallman
2005-12-08 16:14     ` Drew Adams
2005-12-09 13:17       ` Eli Zaretskii
2005-12-09 14:07         ` Chong Yidong
2005-12-09 18:37         ` [drew.adams@oracle.com: RE: weird defadvice bug withbyte-compilation] Drew Adams
2005-12-10  4:14         ` [drew.adams@oracle.com: RE: weird defadvice bug with byte-compilation] Richard M. Stallman
2005-12-11 18:17           ` [drew.adams@oracle.com: RE: weird defadvice bug withbyte-compilation] Drew Adams
2005-12-12  5:23             ` Richard M. Stallman
2005-12-12  5:40               ` [drew.adams@oracle.com: RE: weird defadvice bugwithbyte-compilation] Drew Adams
2005-12-13  3:14                 ` Richard M. Stallman
2005-12-13  3:52                   ` [drew.adams@oracle.com: RE: weird defadvicebugwithbyte-compilation] Drew Adams
2005-12-13 23:33                     ` Richard M. Stallman
2005-12-14  1:05                       ` [drew.adams@oracle.com: RE: weirddefadvicebugwithbyte-compilation] Drew Adams
2005-12-14  1:24                         ` Johan Bockgård
2005-12-14  3:41                           ` [drew.adams@oracle.com: Drew Adams
2005-12-14  3:45                             ` [drew.adams@oracle.com:RE:weirddefadvicebugwithbyte-compilation] Drew Adams
2005-12-14 17:17                             ` [drew.adams@oracle.com: Johan Bockgård
2005-12-14 21:29                               ` [drew.adams@oracle.com:RE:weirddefadvicebugwithbyte-compilation] Drew Adams
2005-12-14 23:43                                 ` [drew.adams@oracle.com:RE:weirddefadvicebugwithbyte-compilation] Johan Bockgård
2005-12-15  1:46                                   ` [drew.adams@oracle.com:RE:weirddefadvicebugwithbyte-compilation] Drew Adams
2005-12-11 20:21         ` [drew.adams@oracle.com: RE: weird defadvice bug with byte-compilation] Eli Zaretskii
2005-12-11 21:35           ` [drew.adams@oracle.com: RE: weird defadvice bug withbyte-compilation] Drew Adams
2005-12-12  5:52             ` Eli Zaretskii
2005-12-12  6:11               ` [drew.adams@oracle.com: RE: weird defadvice bugwithbyte-compilation] Drew Adams
2005-12-12  6:44                 ` [drew.adams@oracle.com: RE: weird defadvicebugwithbyte-compilation] Drew Adams
2005-12-12 21:22                   ` Eli Zaretskii
2005-12-12 21:53                     ` [drew.adams@oracle.com: RE: weirddefadvicebugwithbyte-compilation] Drew Adams
2005-12-13  4:30                       ` Eli Zaretskii
2005-12-13  4:59                         ` [drew.adams@oracle.com: Drew Adams
2005-12-12  5:23           ` [drew.adams@oracle.com: RE: weird defadvice bug with byte-compilation] Richard M. Stallman
2005-12-12  6:11             ` Eli Zaretskii
2005-12-13  3:14               ` Richard M. Stallman
2005-12-13  4:39                 ` Eli Zaretskii
2005-12-13 23:33                   ` Richard M. Stallman
2005-12-14 19:38                     ` Eli Zaretskii
2005-12-15  2:09                       ` Richard M. Stallman
2005-12-15  4:46                         ` Eli Zaretskii
2005-12-16  1:51                           ` Richard M. Stallman
2005-12-16 19:48                             ` Eli Zaretskii
2005-12-16 20:14                             ` Eli Zaretskii
2005-12-17  1:05                               ` Richard M. Stallman
2005-12-17  8:29                                 ` Eli Zaretskii
2005-12-17 23:59                                   ` Richard M. Stallman
  -- strict thread matches above, loose matches on Subject: below --
2005-11-28  4:46 Richard M. Stallman

Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.