[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Printing to STDERR when %d is "Cannot access memory ..."

From: Keith David Bershatsky
Subject: Printing to STDERR when %d is "Cannot access memory ..."
Date: Wed, 13 Jun 2018 11:37:09 -0700

I am working on crosshairs (17684) and multiple fake cursors (22873) and 
created a little problem for myself in that a character not recognized by the 
font (U0001D4D5) [aka a pretty letter f] on a line all by itself does not have 
a font->space_width and causes Emacs to crash when printing said value to 

GDB returns "Cannot access memory at address 0xa0" when printing the value of 

This came about by using the following setting for a Form Feed character:

(setq buffer-display-table (make-display-table))
(aset buffer-display-table
      (vector (make-glyph-code ?\U0001D4D5 'font-lock-warning-face)))

I am by passing the problem by not using ?\U0001D4D5.  However, I would like to 
come up with programmatic solution to avoid crashing Emacs when printing values 

I tried:

fprintf (stderr, "(%d)", (font->space_width == NULL
                          ? 0
                          : font->space_width);

However, that didn't fix the problem.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]