diff options
| author | Paul Eggert | 2019-07-21 12:31:51 -0700 |
|---|---|---|
| committer | Paul Eggert | 2019-07-21 12:32:16 -0700 |
| commit | 5d4dd552c29279b8a9e6ed269a2dc3afc36f73b9 (patch) | |
| tree | 95edeff83e756072c35f974f6271ba8c191d8436 /src/lisp.h | |
| parent | d02c2f7f6507105605ed0596a7e26acd5b3b8122 (diff) | |
| download | emacs-5d4dd552c29279b8a9e6ed269a2dc3afc36f73b9.tar.gz emacs-5d4dd552c29279b8a9e6ed269a2dc3afc36f73b9.zip | |
Fix lifetime error in previous patch
Problem reported by Pip Cet in:
https://lists.gnu.org/r/emacs-devel/2019-07/msg00520.html
* src/alloc.c (inhibit_garbage_collection): Use new function.
(allow_garbage_collection): Accept intmax_t, not pointer.
* src/eval.c (default_toplevel_binding, do_one_unbind)
(backtrace_eval_unrewind, Fbacktrace__locals, mark_specpdl):
Support SPECPDL_UNWIND_INTMAX.
(record_unwind_protect_excursion): New function.
* src/lisp.h (enum specbind_tag): New constant SPECPDL_UNWIND_INTMAX.
(union specbinding): New member unwind_intmax.
Diffstat (limited to 'src/lisp.h')
| -rw-r--r-- | src/lisp.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/lisp.h b/src/lisp.h index 6d101fed908..9d37629bc46 100644 --- a/src/lisp.h +++ b/src/lisp.h | |||
| @@ -3156,6 +3156,7 @@ enum specbind_tag { | |||
| 3156 | Its elements are potential Lisp_Objects. */ | 3156 | Its elements are potential Lisp_Objects. */ |
| 3157 | SPECPDL_UNWIND_PTR, /* Likewise, on void *. */ | 3157 | SPECPDL_UNWIND_PTR, /* Likewise, on void *. */ |
| 3158 | SPECPDL_UNWIND_INT, /* Likewise, on int. */ | 3158 | SPECPDL_UNWIND_INT, /* Likewise, on int. */ |
| 3159 | SPECPDL_UNWIND_INTMAX, /* Likewise, on intmax_t. */ | ||
| 3159 | SPECPDL_UNWIND_EXCURSION, /* Likewise, on an execursion. */ | 3160 | SPECPDL_UNWIND_EXCURSION, /* Likewise, on an execursion. */ |
| 3160 | SPECPDL_UNWIND_VOID, /* Likewise, with no arg. */ | 3161 | SPECPDL_UNWIND_VOID, /* Likewise, with no arg. */ |
| 3161 | SPECPDL_BACKTRACE, /* An element of the backtrace. */ | 3162 | SPECPDL_BACKTRACE, /* An element of the backtrace. */ |
| @@ -3193,6 +3194,11 @@ union specbinding | |||
| 3193 | } unwind_int; | 3194 | } unwind_int; |
| 3194 | struct { | 3195 | struct { |
| 3195 | ENUM_BF (specbind_tag) kind : CHAR_BIT; | 3196 | ENUM_BF (specbind_tag) kind : CHAR_BIT; |
| 3197 | void (*func) (intmax_t); | ||
| 3198 | intmax_t arg; | ||
| 3199 | } unwind_intmax; | ||
| 3200 | struct { | ||
| 3201 | ENUM_BF (specbind_tag) kind : CHAR_BIT; | ||
| 3196 | Lisp_Object marker, window; | 3202 | Lisp_Object marker, window; |
| 3197 | } unwind_excursion; | 3203 | } unwind_excursion; |
| 3198 | struct { | 3204 | struct { |
| @@ -4118,6 +4124,7 @@ extern void record_unwind_protect (void (*) (Lisp_Object), Lisp_Object); | |||
| 4118 | extern void record_unwind_protect_array (Lisp_Object *, ptrdiff_t); | 4124 | extern void record_unwind_protect_array (Lisp_Object *, ptrdiff_t); |
| 4119 | extern void record_unwind_protect_ptr (void (*) (void *), void *); | 4125 | extern void record_unwind_protect_ptr (void (*) (void *), void *); |
| 4120 | extern void record_unwind_protect_int (void (*) (int), int); | 4126 | extern void record_unwind_protect_int (void (*) (int), int); |
| 4127 | extern void record_unwind_protect_intmax (void (*) (intmax_t), intmax_t); | ||
| 4121 | extern void record_unwind_protect_void (void (*) (void)); | 4128 | extern void record_unwind_protect_void (void (*) (void)); |
| 4122 | extern void record_unwind_protect_excursion (void); | 4129 | extern void record_unwind_protect_excursion (void); |
| 4123 | extern void record_unwind_protect_nothing (void); | 4130 | extern void record_unwind_protect_nothing (void); |