diff options
| author | Paul Eggert | 2017-05-19 16:15:07 -0700 |
|---|---|---|
| committer | Paul Eggert | 2017-05-19 16:15:21 -0700 |
| commit | 7d00410af69b3cbbf0e8fc9765f3bf9f5616286d (patch) | |
| tree | cb1a663efc4bf209aedfc0a419763a371cb711c7 | |
| parent | a5acb3701a7b4ab8b82aede308d28a47a383ae9c (diff) | |
| download | emacs-7d00410af69b3cbbf0e8fc9765f3bf9f5616286d.tar.gz emacs-7d00410af69b3cbbf0e8fc9765f3bf9f5616286d.zip | |
Add handlerlist assertion to module code
* src/emacs-module.c (module_reset_handlerlist):
Check handlerlist. Suggested by Philipp Stephani in:
http://lists.gnu.org/archive/html/emacs-devel/2017-05/msg00521.html
| -rw-r--r-- | src/emacs-module.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/emacs-module.c b/src/emacs-module.c index 5aa8a881745..0bc1b6c384b 100644 --- a/src/emacs-module.c +++ b/src/emacs-module.c | |||
| @@ -918,10 +918,12 @@ finalize_environment (struct emacs_env_private *env) | |||
| 918 | /* Must be called after setting up a handler immediately before | 918 | /* Must be called after setting up a handler immediately before |
| 919 | returning from the function. See the comments in lisp.h and the | 919 | returning from the function. See the comments in lisp.h and the |
| 920 | code in eval.c for details. The macros below arrange for this | 920 | code in eval.c for details. The macros below arrange for this |
| 921 | function to be called automatically. DUMMY is ignored. */ | 921 | function to be called automatically. PHANDLERLIST points to a word |
| 922 | containing the handler list, for sanity checking. */ | ||
| 922 | static void | 923 | static void |
| 923 | module_reset_handlerlist (struct handler *const *dummy) | 924 | module_reset_handlerlist (struct handler *const *phandlerlist) |
| 924 | { | 925 | { |
| 926 | eassert (handlerlist == *phandlerlist); | ||
| 925 | handlerlist = handlerlist->next; | 927 | handlerlist = handlerlist->next; |
| 926 | } | 928 | } |
| 927 | 929 | ||