diff options
| author | Philipp Stephani <phst@google.com> | 2017-07-10 00:28:50 +0200 |
|---|---|---|
| committer | Philipp Stephani <phst@google.com> | 2017-07-10 00:28:50 +0200 |
| commit | 81131ff26fe2a36c2ed0a4853d85af3bcb8bbdb1 (patch) | |
| tree | c0cb00c7bbccb943af6aa851e47e8d138e86faec /src | |
| parent | 22af69906cca871fdb893e06d6f10dbbab4518e6 (diff) | |
| download | emacs-81131ff26fe2a36c2ed0a4853d85af3bcb8bbdb1.tar.gz | |
Re-add a useful assertion
* src/emacs-module.c (module_free_global_ref): Re-add assertion that
the reference count is zero. This assertion was removed in commit
8afaa1321f8088bfb877fe4b6676e8517adb0bb7, but it's not included in the
test performed by XFASTINT before, because the previous reference
count could have been zero already in the case of a buggy
implementation. This assertion might have detected Bug#27587.
Diffstat (limited to 'src')
| -rw-r--r-- | src/emacs-module.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/emacs-module.c b/src/emacs-module.c index ba996982604..7e0ba3c16c1 100644 --- a/src/emacs-module.c +++ b/src/emacs-module.c @@ -328,7 +328,10 @@ module_free_global_ref (emacs_env *env, emacs_value ref) set_hash_value_slot (h, i, value); } else - hash_remove_from_table (h, obj); + { + eassert (refcount == 0); + hash_remove_from_table (h, obj); + } } if (module_assertions) |
