[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] trunk r116081: Pacify valgrind by initializing buffer redi
From: |
Paul Eggert |
Subject: |
[Emacs-diffs] trunk r116081: Pacify valgrind by initializing buffer redisplay bit. |
Date: |
Mon, 20 Jan 2014 16:47:48 +0000 |
User-agent: |
Bazaar (2.6b2) |
------------------------------------------------------------
revno: 116081
revision-id: address@hidden
parent: address@hidden
author: Paul Eggert <address@hidden>
committer: Paul Eggert <address@hidden>
branch nick: trunk
timestamp: Mon 2014-01-20 08:47:41 -0800
message:
Pacify valgrind by initializing buffer redisplay bit.
Problem reported by Dmitry Antipov in
<http://lists.gnu.org/archive/html/emacs-devel/2014-01/msg01756.html>.
* alloc.c (USE_VALGRIND): Move this to ...
* conf_post.h (USE_VALGRIND): ... here. Use booleans.
* buffer.c (Fget_buffer_create): Initialize redisplay bit
to pacify valgrind.
modified:
src/ChangeLog changelog-20091113204419-o5vbwnq5f7feedwu-1438
src/alloc.c alloc.c-20091113204419-o5vbwnq5f7feedwu-252
src/buffer.c buffer.c-20091113204419-o5vbwnq5f7feedwu-264
src/conf_post.h conf_post.h-20120730211826-q0qbxxwh2emw52hd-1
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog 2014-01-20 07:56:28 +0000
+++ b/src/ChangeLog 2014-01-20 16:47:41 +0000
@@ -1,5 +1,13 @@
2014-01-20 Paul Eggert <address@hidden>
+ Pacify valgrind by initializing buffer redisplay bit.
+ Problem reported by Dmitry Antipov in
+ <http://lists.gnu.org/archive/html/emacs-devel/2014-01/msg01756.html>.
+ * alloc.c (USE_VALGRIND): Move this to ...
+ * conf_post.h (USE_VALGRIND): ... here. Use booleans.
+ * buffer.c (Fget_buffer_create): Initialize redisplay bit
+ to pacify valgrind.
+
Revert some of the CANNOT_DUMP fix (Bug#16494).
* lread.c (init_lread): Fix typo: NILP, not !NILP.
=== modified file 'src/alloc.c'
--- a/src/alloc.c 2014-01-03 06:42:23 +0000
+++ b/src/alloc.c 2014-01-20 16:47:41 +0000
@@ -48,12 +48,6 @@
#include <verify.h>
-#if (defined ENABLE_CHECKING \
- && defined HAVE_VALGRIND_VALGRIND_H \
- && !defined USE_VALGRIND)
-# define USE_VALGRIND 1
-#endif
-
#if USE_VALGRIND
#include <valgrind/valgrind.h>
#include <valgrind/memcheck.h>
=== modified file 'src/buffer.c'
--- a/src/buffer.c 2014-01-01 07:43:34 +0000
+++ b/src/buffer.c 2014-01-20 16:47:41 +0000
@@ -573,7 +573,9 @@
BUF_END_UNCHANGED (b) = 0;
BUF_BEG_UNCHANGED (b) = 0;
*(BUF_GPT_ADDR (b)) = *(BUF_Z_ADDR (b)) = 0; /* Put an anchor '\0'. */
- b->text->inhibit_shrinking = 0;
+ b->text->inhibit_shrinking = false;
+ if (USE_VALGRIND)
+ b->text->redisplay = false;
b->newline_cache = 0;
b->width_run_cache = 0;
=== modified file 'src/conf_post.h'
--- a/src/conf_post.h 2014-01-01 07:43:34 +0000
+++ b/src/conf_post.h 2014-01-20 16:47:41 +0000
@@ -65,6 +65,15 @@
# define ADDRESS_SANITIZER false
#endif
+/* True if Emacs might be run under valgrind. */
+#ifndef USE_VALGRIND
+# if defined ENABLE_CHECKING && defined HAVE_VALGRIND_VALGRIND_H
+# define USE_VALGRIND true
+# else
+# define USE_VALGRIND false
+# endif
+#endif
+
#ifdef DARWIN_OS
#ifdef emacs
#define malloc unexec_malloc
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] trunk r116081: Pacify valgrind by initializing buffer redisplay bit.,
Paul Eggert <=