[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/trunk r109405: Fix macroexp crash on Window
From: |
Paul Eggert |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/trunk r109405: Fix macroexp crash on Windows with debugging. |
Date: |
Thu, 02 Aug 2012 13:59:49 -0700 |
User-agent: |
Bazaar (2.5.0) |
------------------------------------------------------------
revno: 109405
fixes bug: http://debbugs.gnu.org/12118
committer: Paul Eggert <address@hidden>
branch nick: trunk
timestamp: Thu 2012-08-02 13:59:49 -0700
message:
Fix macroexp crash on Windows with debugging.
* lisp.h (ASET) [ENABLE_CHECKING]: Ignore ARRAY_MARK_FLAG when
checking subscripts; problem introduced with the recent
"ASET (a, i, v)" rather than "AREF (a, i) = v" patch.
(ARRAY_MARK_FLAG): Now a macro as well as a constant,
since it's used in non-static inline functions now.
modified:
src/ChangeLog
src/lisp.h
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog 2012-08-02 10:49:19 +0000
+++ b/src/ChangeLog 2012-08-02 20:59:49 +0000
@@ -1,5 +1,12 @@
2012-08-02 Paul Eggert <address@hidden>
+ Fix macroexp crash on Windows with debugging (Bug#12118).
+ * lisp.h (ASET) [ENABLE_CHECKING]: Ignore ARRAY_MARK_FLAG when
+ checking subscripts; problem introduced with the recent
+ "ASET (a, i, v)" rather than "AREF (a, i) = v" patch.
+ (ARRAY_MARK_FLAG): Now a macro as well as a constant,
+ since it's used in non-static inline functions now.
+
* xfaces.c (face_at_buffer_position, face_for_overlay_string):
Don't assume buffer size fits in 'int'. Remove unused local.
=== modified file 'src/lisp.h'
--- a/src/lisp.h 2012-08-02 10:49:19 +0000
+++ b/src/lisp.h 2012-08-02 20:59:49 +0000
@@ -331,7 +331,9 @@
/* In the size word of a vector, this bit means the vector has been marked. */
-static ptrdiff_t const ARRAY_MARK_FLAG = PTRDIFF_MIN;
+static ptrdiff_t const ARRAY_MARK_FLAG
+#define ARRAY_MARK_FLAG PTRDIFF_MIN
+ = ARRAY_MARK_FLAG;
/* In the size word of a struct Lisp_Vector, this bit means it's really
some other vector-like object. */
@@ -606,7 +608,7 @@
/* The IDX==IDX tries to detect when the macro argument is side-effecting. */
#define ASET(ARRAY, IDX, VAL) \
(eassert ((IDX) == (IDX)), \
- eassert ((IDX) >= 0 && (IDX) < ASIZE (ARRAY)), \
+ eassert ((IDX) >= 0 && (IDX) < (ASIZE (ARRAY) & ~ARRAY_MARK_FLAG)), \
XVECTOR (ARRAY)->contents[IDX] = (VAL))
/* Convenience macros for dealing with Lisp strings. */
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/trunk r109405: Fix macroexp crash on Windows with debugging.,
Paul Eggert <=