From: Vibhav Pant <vibhavp@gmail.com>
To: Paul Eggert <eggert@cs.ucla.edu>
Cc: Emacs development discussions <emacs-devel@gnu.org>
Subject: Re: Critical bytecode bug with hash tables while dumping emacs.
Date: Fri, 27 Jan 2017 13:45:57 +0000 [thread overview]
Message-ID: <CA+T2Sh284rJRkDkJL0WEXD4sfAGmV1E7ZvRMETSSn7kb-heQfg@mail.gmail.com> (raw)
In-Reply-To: <CA+T2Sh2fD7x9F4n+euwRkuCWWhCw2_mvsTjeeoTS91kMLHYMkQ@mail.gmail.com>
[-- Attachment #1.1: Type: text/plain, Size: 1259 bytes --]
Also, this one line patch crashes temacs with a SIGSEGV - the hash table
contents
are possibly getting corrupted because of a bad memory write.
On Fri, Jan 27, 2017 at 12:27 AM Vibhav Pant <vibhavp@gmail.com> wrote:
> On Thu, Jan 26, 2017 at 11:03 PM, Paul Eggert <eggert@cs.ucla.edu> wrote:
> > In that case the bug is not critical, right? One way to address the
> problem
> > is to say that code should not print hash tables before dumping.
>
> It's critical in the sense that any code loaded from loadup.el is
> effectively
> prohibited from using printed hash tables in any way. I've recently been
> working on adding a new 'switch` bytecode op (@ branch
> feature/byte-switch),
> which uses hash tables generated during compile time (so the constant
> vector
> stores printed hash tables) as jump tables. This bug breaks switch
> entirely.
>
> > we're planning to redo dumping anyway and can address this problem (if
> it still
> > occurs) then.
>
> I suspect this bug is related to purecopy, which I suppose isn't a part of
> the
> redo (or is it? I don't know much about the new dumping code). If anyone
> has any
> ideas about this issue, I'd appreciate some pointers on where to start.
>
> Thanks,
> Vibhav
> --
> Vibhav Pant
> vibhavp@gmail.com
>
[-- Attachment #1.2: Type: text/html, Size: 2160 bytes --]
[-- Attachment #2: wrong-hash-table.patch --]
[-- Type: text/x-patch, Size: 672 bytes --]
diff --git a/lisp/custom.el b/lisp/custom.el
index 70b6839db3..beccb2b545 100644
--- a/lisp/custom.el
+++ b/lisp/custom.el
@@ -145,6 +145,8 @@ custom-declare-variable
`standard-value'. At the same time, SYMBOL's property `force-value' is
set to nil, as the value is no longer rogue."
(put symbol 'standard-value (purecopy (list default)))
+ (message "%s" #s(hash-table size 65 test eql rehash-size 1.5 rehash-threshold 0.8 data
+ (1 2 3 4 5 6 7 8 9 1 a a b b c c d d e e q q w w r r t t)))
;; Maybe this option was rogue in an earlier version. It no longer is.
(when (get symbol 'force-value)
(put symbol 'force-value nil))
prev parent reply other threads:[~2017-01-27 13:45 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-26 13:03 Critical bytecode bug with hash tables while dumping emacs Vibhav Pant
2017-01-26 17:33 ` Paul Eggert
2017-01-26 18:57 ` Vibhav Pant
2017-01-27 13:45 ` Vibhav Pant [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CA+T2Sh284rJRkDkJL0WEXD4sfAGmV1E7ZvRMETSSn7kb-heQfg@mail.gmail.com \
--to=vibhavp@gmail.com \
--cc=eggert@cs.ucla.edu \
--cc=emacs-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).