unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Pip Cet <pipcet@gmail.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 41627@debbugs.gnu.org, all_but_last@163.com
Subject: bug#41627: 28.0.50; Emacs with cairo build segfault in HELLO file
Date: Mon, 1 Jun 2020 18:02:12 +0000	[thread overview]
Message-ID: <CAOqdjBeNOe+T_YS8GMXSOGdPRWgd2rmVYaZdBabqLB3ikoRdoQ@mail.gmail.com> (raw)
In-Reply-To: <83sgfeeoc9.fsf@gnu.org>

On Mon, Jun 1, 2020 at 4:35 PM Eli Zaretskii <eliz@gnu.org> wrote:
> > From: Pip Cet <pipcet@gmail.com>
> > Date: Sun, 31 May 2020 20:45:56 +0000
> > Cc: Zihao Zhu <all_but_last@163.com>, 41627@debbugs.gnu.org
> >
> > > Can someone please propose a patch along these lines?  I cannot easily
> > > test a Cairo build, so I won't try showing a patch.
> >
> > How about this?
>
> LGTM, thanks.  I gather that you tested this bail-out, and saw that it
> does TRT (probably skipping the problematic font)?

Yes, I did, but I'd really like to corrupt some font files and test
further. I think there might be more resource leaks there.

> > (I'm not sure how and whether `match' is supposed to be freed in the
> > success case, or whether it's simply leaked).
>
> From some code fragments I see on the net, I think you are right, and
> we should free it before returning.

I tried doing that in the debugger, and there was no immediate
segfault, for all that's worth. By now I've downloaded fontconfig...

> Btw, there are more calls to cairo_ft_scaled_font_lock_face in our
> code followed by unconditional dereference of the result...

As I said, "I suspect the attached patch will work, but if this is
something Cairo does in other places it needs to be checked." Some
initial investigation reveals that yes, Cairo does it all over the
place.





  reply	other threads:[~2020-06-01 18:02 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-31 11:32 bug#41627: 28.0.50; Emacs with cairo build segfault in HELLO file Zihao Zhu
2020-05-31 12:35 ` Pip Cet
2020-05-31 14:27   ` Zihao Zhu
2020-05-31 14:34     ` Pip Cet
2020-05-31 14:31   ` Zihao Zhu
2020-05-31 14:54 ` Eli Zaretskii
2020-05-31 15:38   ` Zihao Zhu
2020-05-31 17:24     ` Eli Zaretskii
2020-05-31 20:45       ` Pip Cet
2020-06-01 16:35         ` Eli Zaretskii
2020-06-01 18:02           ` Pip Cet [this message]
2020-09-27 14:29             ` Lars Ingebrigtsen
2020-10-21 15:58               ` Robert Pluim
2020-10-22 11:41                 ` Lars Ingebrigtsen
2020-10-22 12:03                   ` Zhu Zihao
2020-10-22 12:43                     ` Lars Ingebrigtsen
2020-06-22 16:47 ` Zhu Zihao
2020-06-22 18:06   ` Eli Zaretskii
2020-06-23  4:10     ` bug#41627: " Zhu Zihao

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=CAOqdjBeNOe+T_YS8GMXSOGdPRWgd2rmVYaZdBabqLB3ikoRdoQ@mail.gmail.com \
    --to=pipcet@gmail.com \
    --cc=41627@debbugs.gnu.org \
    --cc=all_but_last@163.com \
    --cc=eliz@gnu.org \
    /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 public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).