diff options
| author | Eli Zaretskii | 2024-06-06 10:47:21 +0300 |
|---|---|---|
| committer | Eli Zaretskii | 2024-06-06 10:47:21 +0300 |
| commit | 7fbafb9d9527f3888469dead8309fd748d2fb9e0 (patch) | |
| tree | 17de55f915aecb867e6657f62e1ff76964e56006 | |
| parent | 0467b756aaef713fb948e2746e1333a9d86e2e7e (diff) | |
| download | emacs-7fbafb9d9527f3888469dead8309fd748d2fb9e0.tar.gz emacs-7fbafb9d9527f3888469dead8309fd748d2fb9e0.zip | |
Attempt to fix rare assertion violations in 'mark_terminals'
* src/terminal.c (delete_terminal): Block input while we modify
the frame list and 'terminal_list'. (Bug#71289)
| -rw-r--r-- | src/terminal.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/terminal.c b/src/terminal.c index e8316ba32e8..5c21341d905 100644 --- a/src/terminal.c +++ b/src/terminal.c | |||
| @@ -22,6 +22,7 @@ along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>. */ | |||
| 22 | #include "character.h" | 22 | #include "character.h" |
| 23 | #include "frame.h" | 23 | #include "frame.h" |
| 24 | #include "termchar.h" | 24 | #include "termchar.h" |
| 25 | #include "blockinput.h" | ||
| 25 | #include "termhooks.h" | 26 | #include "termhooks.h" |
| 26 | #include "keyboard.h" | 27 | #include "keyboard.h" |
| 27 | 28 | ||
| @@ -316,6 +317,9 @@ delete_terminal (struct terminal *terminal) | |||
| 316 | delete_terminal_hook when we delete our last frame. */ | 317 | delete_terminal_hook when we delete our last frame. */ |
| 317 | if (!terminal->name) | 318 | if (!terminal->name) |
| 318 | return; | 319 | return; |
| 320 | |||
| 321 | /* Protection while we are in inconsistent state. */ | ||
| 322 | block_input (); | ||
| 319 | xfree (terminal->name); | 323 | xfree (terminal->name); |
| 320 | terminal->name = NULL; | 324 | terminal->name = NULL; |
| 321 | 325 | ||
| @@ -331,6 +335,7 @@ delete_terminal (struct terminal *terminal) | |||
| 331 | } | 335 | } |
| 332 | 336 | ||
| 333 | delete_terminal_internal (terminal); | 337 | delete_terminal_internal (terminal); |
| 338 | unblock_input (); | ||
| 334 | } | 339 | } |
| 335 | 340 | ||
| 336 | void | 341 | void |