GNU bug report logs - #77478
Fixes a crash in the Haiku font driver for daemon mode

Previous Next

Package: emacs;

Reported by: Kyle Ambroff-Kao <kyle <at> ambroffkao.com>

Date: Thu, 3 Apr 2025 06:56:01 UTC

Severity: normal

Tags: patch

Merged with 77479

Done: Po Lu <luangruo <at> yahoo.com>

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Po Lu <luangruo <at> yahoo.com>
Cc: tracker <at> debbugs.gnu.org
Subject: bug#77478: closed (Fixes a crash in the Haiku font driver for
 daemon mode)
Date: Thu, 29 May 2025 00:26:02 +0000
[Message part 1 (text/plain, inline)]
Your message dated Thu, 29 May 2025 08:25:40 +0800
with message-id <87o6vcs1ob.fsf <at> yahoo.com>
and subject line Re: bug#77478: Fixes a crash in the Haiku font driver for daemon mode
has caused the debbugs.gnu.org bug report #77478,
regarding Fixes a crash in the Haiku font driver for daemon mode
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)


-- 
77478: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=77478
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Kyle Ambroff-Kao <kyle <at> ambroffkao.com>
To: bug-gnu-emacs <at> gnu.org
Cc: Kyle Ambroff-Kao <kyle <at> ambroffkao.com>
Subject: Fixes a crash in the Haiku font driver for daemon mode
Date: Wed, 02 Apr 2025 23:33:54 -0700
[Message part 3 (text/plain, inline)]
Tags: patch

Fix use-after-free bug in the Haiku font driver

* src/haikufont.c: Set objects freed with haikufont_close to NULL so
  they will not be reused, which seems to happen in daemon mode when all
  frames have been closed and fonts are garbage collected.

In GNU Emacs 30.1 (build 2, amd64-portbld-freebsd15.0, GTK+ Version
3.24.48, cairo version 1.18.2)
System Description: 15.0-CURRENT

Configured using:
 'configure --disable-build-details --localstatedir=/var --without-gconf
 --without-libsystemd --without-selinux --with-x --enable-acl
 --with-cairo --with-dbus --with-gif --with-gnutls --with-gsettings
 --with-x-toolkit=gtk3 --with-harfbuzz --with-jpeg
 --with-file-notification=kqueue --with-lcms2 --without-m17n-flt
 --without-imagemagick --with-mailutils --with-modules
 --with-native-compilation=aot --with-sound=oss --without-libotf
 --without-pgtk --with-png --with-toolkit-scroll-bars --with-sqlite3
 --with-rsvg --with-threads --with-tiff --with-tree-sitter --with-webp
 --without-xft --with-xim --with-xml2 --with-xpm --without-xwidgets
 --x-libraries=/usr/local/lib --x-includes=/usr/local/include
 --prefix=/usr/local --mandir=/usr/local/share/man
 --disable-silent-rules --infodir=/usr/local/share/emacs/info/
 --build=amd64-portbld-freebsd15.0 'CFLAGS=-O2 -pipe
 -fstack-protector-strong -Wl,-rpath=/usr/local/lib/gcc13 -isystem
 /usr/local/include -fno-strict-aliasing ' 'CPPFLAGS=-isystem
 /usr/local/include' 'LDFLAGS= -fstack-protector-strong
 -Wl,-rpath=/usr/local/lib/gcc13 -L/usr/local/lib/gcc13 -L/usr/local/lib
 ''

[haiku-font-double-free.diff (text/patch, attachment)]
[Message part 5 (message/rfc822, inline)]
From: Po Lu <luangruo <at> yahoo.com>
To: "Kyle Ambroff-Kao" <kyle <at> ambroffkao.com>
Cc: Eli Zaretskii <eliz <at> gnu.org>, 77478-done <at> debbugs.gnu.org
Subject: Re: bug#77478: Fixes a crash in the Haiku font driver for daemon mode
Date: Thu, 29 May 2025 08:25:40 +0800
"Kyle Ambroff-Kao" <kyle <at> ambroffkao.com> writes:

> Thanks for looking into this everybody. I tested your variant of the
> fix Po and it also prevents the crash for me.

Closing, thanks.


This bug report was last modified 25 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.