git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: gitk crashes if the diff contains certain unicode characters

From
Danh Doan <congdanhqx@gmail.com>
Date
Apr 19, 2020, 14:30 UTC
Message-ID
<20200419143008.GD28207@danh.dev>
In-Reply-To
<edace460-d252-2742-7576-e7601b6e959c@dragon.best>
On 2020-04-19 14:15:06+0200, Glax <glax@dragon.best> wrote:
Show 25 quoted lines
> Looks like certain characters cause gitk to crash when it tries to
> render a diff.
> 
> 
> How to repro:
> 
> 	git init
> 	echo foo >foo
> 	git add foo
> 	git commit -m foo
> 	# The following assumes bash builtin echo
> 	echo -e '\u2754' >foo
> 	gitk
> 
> Now `foo` should contain the character U+2754 encoded as utf-8.
> 
> If on gitk you click on "Local uncommitted changes", it'll crash with
> the following message:
> 
> 	X Error of failed request:  BadLength (poly request too large or
> internal Xlib length error)
> 	  Major opcode of failed request:  139 (RENDER)
> 	  Minor opcode of failed request:  20 (RenderAddGlyphs)
> 	  Serial number of failed request:  4220
> 	  Current serial number in output stream:  4247

U+2754 is *WHITE* QUESTION MARK ORNAMENT The error message is very familiar to me.

I /think/ it's a bug in libXft, it can't handle colored emoji, yet.

There're similar issue reported to Google Noto Emoji font: https://github.com/googlefonts/noto-emoji/issues/183

-- 
Danh
Previous: Andreas Schwab
Message 3 of 3 in “gitk crashes if the diff contains certain unicode characters”
  1. GlaxApr 19, 2020
  2. Andreas SchwabApr 19, 2020
  3. Danh DoanApr 19, 2020

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.