all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Helmut Eller <eller.helmut@gmail.com>
To: "Gerd Möllmann" <gerd.moellmann@gmail.com>
Cc: Eli Zaretskii <eliz@gnu.org>,  Emacs Devel <emacs-devel@gnu.org>
Subject: Re: MPS image cache
Date: Mon, 06 May 2024 16:16:12 +0200	[thread overview]
Message-ID: <8734qv10wj.fsf@gmail.com> (raw)
In-Reply-To: <m2o79k8x9p.fsf@pro2.fritz.box> ("Gerd Möllmann"'s message of "Sun, 05 May 2024 10:42:58 +0200")

[-- Attachment #1: Type: text/plain, Size: 688 bytes --]

On Sun, May 05 2024, Gerd Möllmann wrote:

>> Would something like this also be needed for glyph matrices?  
>
> Probably. Either we make the matrices roots, or objects, I guess. For
> correctness. We can't easily realloc when they are objects, but I don't
> think that's a big problem.
>
>> Or in general, can we scan anything other than the block that
>> dflt_scan was called with? 
>
> Let's say we shouldn't :-). MPS lets us scan memory it doesn't manage,
> but with multi-threading it's not really safe.

So fix_glyph_matrix currently doesn't things exactly by the book.  Hm.

Anyway, I have a patch that prevents my Emacs from sporadically crashing
at startup.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-Zero-out-terminal-keyboard_coding.patch --]
[-- Type: text/x-diff, Size: 1342 bytes --]

From eda36223e8062337cd40c97471749c519fcc7b9b Mon Sep 17 00:00:00 2001
From: Helmut Eller <eller.helmut@gmail.com>
Date: Mon, 6 May 2024 10:07:14 +0200
Subject: [PATCH] Zero out terminal->keyboard_coding

This avoids hard to reproduce crashes in fix_coding.

* src/terminal.c (create_terminal): Use xzalloc instead of
xmalloc.
---
 src/terminal.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/terminal.c b/src/terminal.c
index 23a5582d4d9..33f8623c214 100644
--- a/src/terminal.c
+++ b/src/terminal.c
@@ -24,6 +24,9 @@
 #include "termchar.h"
 #include "termhooks.h"
 #include "keyboard.h"
+#ifdef HAVE_MPS
+#include "igc.h"
+#endif
 
 #if HAVE_STRUCT_UNIPAIR_UNICODE
 # include <errno.h>
@@ -281,8 +284,13 @@ create_terminal (enum output_method type, struct redisplay_interface *rif)
   terminal->rif = rif;
   terminal->id = next_terminal_id++;
 
+#ifdef HAVE_MPS
+  terminal->keyboard_coding = xzalloc (sizeof (struct coding_system));
+  terminal->terminal_coding = xzalloc (sizeof (struct coding_system));
+#else
   terminal->keyboard_coding = xmalloc (sizeof (struct coding_system));
   terminal->terminal_coding = xmalloc (sizeof (struct coding_system));
+#endif
 
   /* If default coding systems for the terminal and the keyboard are
      already defined, use them in preference to the defaults.  This is
-- 
2.39.2


  reply	other threads:[~2024-05-06 14:16 UTC|newest]

Thread overview: 70+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-03  8:53 MPS image cache Gerd Möllmann
2024-05-03 10:58 ` Helmut Eller
2024-05-03 11:05   ` Po Lu
2024-05-03 11:22   ` Gerd Möllmann
2024-05-03 11:43     ` Gerd Möllmann
2024-05-03 13:24       ` Gerd Möllmann
2024-05-03 17:02         ` Gerd Möllmann
2024-05-04  4:38           ` MPS: scroll-bars (was: MPS image cache) Helmut Eller
2024-05-04  5:22             ` MPS: scroll-bars Gerd Möllmann
2024-05-04  5:29               ` Gerd Möllmann
2024-05-04  5:50             ` Po Lu
2024-05-04  6:27               ` Helmut Eller
2024-05-04  6:45                 ` Gerd Möllmann
2024-05-04  7:05                   ` Helmut Eller
2024-05-04  7:13                     ` Gerd Möllmann
2024-05-04  7:48                       ` Gerd Möllmann
2024-05-04  7:09                   ` Gerd Möllmann
2024-05-04  8:47                     ` Eli Zaretskii
2024-05-04  9:13                       ` Gerd Möllmann
2024-05-04  9:29                         ` Eli Zaretskii
2024-05-04 10:04                           ` Gerd Möllmann
2024-05-04 13:59                             ` MPS: w32 threads Eli Zaretskii
2024-05-04 14:20                               ` Gerd Möllmann
2024-05-05  8:27                                 ` Eli Zaretskii
2024-05-05  9:16                                   ` Gerd Möllmann
2024-05-05 14:39                                     ` Eli Zaretskii
2024-05-05 15:23                                       ` Gerd Möllmann
2024-05-05 15:26                                         ` Gerd Möllmann
2024-05-04  8:29                 ` MPS: scroll-bars Po Lu
2024-05-05  4:52                   ` Gerd Möllmann
2024-05-05  7:53                     ` Helmut Eller
2024-05-05  8:01                       ` Gerd Möllmann
2024-05-05  8:08                         ` Helmut Eller
2024-05-05 16:43                       ` Eli Zaretskii
2024-05-05 18:02                         ` Helmut Eller
2024-05-05 18:09                           ` Eli Zaretskii
2024-05-06 15:05                             ` Eli Zaretskii
2024-05-06 15:53                               ` Gerd Möllmann
2024-05-06 18:25                                 ` Eli Zaretskii
2024-05-07  6:07                                   ` Helmut Eller
2024-05-07 12:56                                     ` Eli Zaretskii
2024-05-07 16:27                                       ` Helmut Eller
2024-05-03 14:59     ` MPS image cache Helmut Eller
2024-05-03 15:11       ` Gerd Möllmann
2024-05-05  6:45         ` Gerd Möllmann
2024-05-05  7:02           ` Gerd Möllmann
2024-05-05  9:00             ` Eli Zaretskii
2024-05-05  9:31               ` Gerd Möllmann
2024-05-05 10:24                 ` Eli Zaretskii
2024-05-05 10:36                   ` Gerd Möllmann
2024-05-05 11:01                     ` Eli Zaretskii
2024-05-05 12:55                       ` Gerd Möllmann
2024-05-05 14:07                         ` Eli Zaretskii
2024-05-05 14:32                           ` Gerd Möllmann
2024-05-05 15:49                             ` Eli Zaretskii
2024-05-05 16:19                               ` Gerd Möllmann
2024-05-05 17:45                               ` Gerd Möllmann
2024-05-05 18:04                                 ` Eli Zaretskii
2024-05-05 18:13                                   ` Eli Zaretskii
2024-05-05 18:35                                     ` Gerd Möllmann
2024-05-05 19:18                                       ` Eli Zaretskii
2024-05-05 19:57                                         ` Gerd Möllmann
2024-05-05  8:16           ` Helmut Eller
2024-05-05  8:42             ` Gerd Möllmann
2024-05-06 14:16               ` Helmut Eller [this message]
2024-05-06 14:28                 ` Gerd Möllmann
2024-05-03 15:02     ` Helmut Eller
2024-05-04 17:51       ` Gerd Möllmann
2024-05-03 11:04 ` Eli Zaretskii
2024-05-03 11:08   ` Gerd Möllmann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8734qv10wj.fsf@gmail.com \
    --to=eller.helmut@gmail.com \
    --cc=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=gerd.moellmann@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.