Paul Eggert [Sun, 30 Nov 2014 07:30:22 +0000 (23:30 -0800)]
Port better to AddressSanitizer.
These changes suffice for temacs on x86-64 with GCC 4.9.2 and
-fsanitize=address.
* alloc.c (valid_pointer_p) [ADDRESS_SANITIZER]:
Return -1 or 0, as the pipe trick doesn't work.
* alloc.c (relocatable_string_data_p, mark_object, sweep_symbols):
* data.c (Ffset):
* print.c (print_object):
When a pointer-check primitive returns -1, do not assume this
means the pointer is valid or that the underlying system has failed.
It could just be that addresses are being sanitized so Emacs can't
test for pointer validity.
* lisp.h (defined_GC_CHECK_STRING_BYTES): New constant.
(USE_STACK_STRING) [GC_CHECK_STRING_BYTES]: Now false, since the
string validity checker doesn't work on stack-based strings.
Paul Eggert [Sat, 29 Nov 2014 07:38:41 +0000 (23:38 -0800)]
Improve clarity of USE_LSB_TAG definition.
Problem reported by Lee Duhem. Suggestion by Andreas Schwab in:
http://lists.gnu.org/archive/html/emacs-devel/2014-11/msg02222.html
* lisp.h (USE_LSB_TAG): Define in terms of the (simpler)
VAL_MAX / 2 rather than in terms of the (more complicated)
EMACS_INT_MAX >> GCTYPEBITS, and adjust commentary to match.
Martin Rudalics [Fri, 28 Nov 2014 17:12:32 +0000 (18:12 +0100)]
Fix two issues around help-window-select. (Bug#11039) (Bug#19012)
* help.el (help-window-old-frame): New variable.
(help-window-select): Default to nil (Bug#11039). Rewrite
doc-string.
(help-window-setup): When the help window appears on another
frame and `help-window-select' is non-nil, give that frame input
focus too (Bug#19012).
(with-help-window): Store selected frame in
help-window-old-frame.
Daiki Ueno [Fri, 28 Nov 2014 06:59:23 +0000 (15:59 +0900)]
epg: Use epg-context-set-*-callback for extra treatment of args
* epa.el (epa-sign-file, epa-encrypt-file, epa-decrypt-region)
(epa-sign-region, epa-encrypt-region): Use
`epg-context-set-{passphrase,progress}-callback', instead of
`setf'. This partially reverts commit 9e48a95c (bug#19150).
Reported by José A. Romero L.
Ulf Jasper [Thu, 27 Nov 2014 17:37:47 +0000 (18:37 +0100)]
newsticker: Change wording of confirmation prompt regarding obsolete variable `newsticker-groups-filename'.
Fixes: debbugs:19165
* lisp/net/newst-treeview.el (newsticker-groups-filename): Change
default value to nil. Point out that variable is obsolete in doc
string.
(newsticker--treeview-load): Change wording of the questions the
user is asked when `newsticker-groups-filename' is found to be
used and we offer to read and remove the groups file.
Eli Zaretskii [Thu, 27 Nov 2014 16:35:27 +0000 (18:35 +0200)]
Fix bug #19201 with after-strings not being displayed.
src/xdisp.c (handle_single_display_spec): When ignoring a fringe
bitmap display, reset the ignore_overlay_strings_at_pos_p flag.
(next_element_from_buffer): When done with overlays, reset the
ignore_overlay_strings_at_pos_p flag.
Stephen Berman [Thu, 27 Nov 2014 10:03:58 +0000 (11:03 +0100)]
outline.el: Fix subtree movement.
Fixes: debbugs:19102 Co-authored-by: Stefan Monnier <monnier@iro.umontreal.ca>
* outline.el (outline-move-subtree-down): Make sure we can move
forward to find the end of the subtree and the insertion point.
Leonard Randall [Thu, 27 Nov 2014 08:38:21 +0000 (09:38 +0100)]
Backport regexp stack overflow fix from emacs-24.
* textmodes/reftex-parse.el (reftex-using-biblatex-p): Make search
for comment lines non-greedy and stopping at newlines to fix stack
overflows with large files. [Backport]
* lisp/progmodes/python.el (python-shell-completion-setup-code): Use
__builtin__ module (or builtins in Python 3) and catch all errors
when importing readline and rlcompleter.
Stephen Berman [Wed, 26 Nov 2014 22:17:41 +0000 (23:17 +0100)]
todo-mode.el: Handle calling revert-buffer.
Fixes: debbugs:19187
* calendar/todo-mode.el: (todo-revert-buffer): New function.
(todo-modes-set-1): Use it as the buffer-local value of
revert-buffer-function.
* dom.el (dom-by-tag): Use `equal' for comparisons so that tags
can be strings.
(dom-elements): Protect against non-text nodes.
(dom-non-text-children): New function.
* net/nsm.el (nsm-format-certificate): Don't bug out on missing
elements.
(nsm-warnings-ok-p): The new version of this function always
returned nil when everything was OK.
Ted Zlatanov [Tue, 25 Nov 2014 14:07:13 +0000 (09:07 -0500)]
Use a simple list of symbols in GnuTLS peer verification.
* gnutls.c (Fgnutls_peer_status_warning_describe): Add function to describe a
peer verification warning symbol.
(Fgnutls_peer_status): Use it.
(Fgnutls_boot): Use it.
Ulrich Müller [Sun, 16 Nov 2014 11:37:54 +0000 (12:37 +0100)]
Use consistent paxctl and setfattr flags for temacs.
* Makefile.in (temacs$(EXEEXT)): Use consistent flag settings
for paxctl and setfattr. Fixes temacs startup failure with
grsecurity/PaX enabled Linux kernel (bug#19067).