diff options
| author | Eli Zaretskii | 2018-10-17 18:19:47 +0300 |
|---|---|---|
| committer | Eli Zaretskii | 2018-10-17 18:19:47 +0300 |
| commit | 73567432329a245b2eb02e4c61adea2c8eab6b3a (patch) | |
| tree | 2dbdfc862dc4b4dbea44b2f613720c50915406cc /src/thread.c | |
| parent | 134ba45bf0c11048c44a46c11d5dc8da12ca4d3e (diff) | |
| download | emacs-73567432329a245b2eb02e4c61adea2c8eab6b3a.tar.gz emacs-73567432329a245b2eb02e4c61adea2c8eab6b3a.zip | |
Avoid assertion violation when comparing with main-thread
* src/thread.c (unmark_main_thread): New function.
* src/lisp.h (unmark_main_thread): Prototype it.
* src/alloc.c (garbage_collect_1): Call it after sweeping.
(Bug#33073)
* test/src/thread-tests.el (threads-test-bug33073): New test.
Diffstat (limited to 'src/thread.c')
| -rw-r--r-- | src/thread.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/thread.c b/src/thread.c index fc933440fcc..3674af0e47b 100644 --- a/src/thread.c +++ b/src/thread.c | |||
| @@ -656,6 +656,12 @@ mark_threads (void) | |||
| 656 | flush_stack_call_func (mark_threads_callback, NULL); | 656 | flush_stack_call_func (mark_threads_callback, NULL); |
| 657 | } | 657 | } |
| 658 | 658 | ||
| 659 | void | ||
| 660 | unmark_main_thread (void) | ||
| 661 | { | ||
| 662 | main_thread.header.size &= ~ARRAY_MARK_FLAG; | ||
| 663 | } | ||
| 664 | |||
| 659 | 665 | ||
| 660 | 666 | ||
| 661 | static void | 667 | static void |