<html>
<head>
<base href="https://bugs.freedesktop.org/">
</head>
<body>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEW "
title="NEW - SIGABRT in _cairo_ft_unscaled_font_create_internal"
href="https://bugs.freedesktop.org/show_bug.cgi?id=105746#c2">Comment # 2</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW - SIGABRT in _cairo_ft_unscaled_font_create_internal"
href="https://bugs.freedesktop.org/show_bug.cgi?id=105746">bug 105746</a>
from <span class="vcard"><a class="email" href="mailto:psychon@znc.in" title="Uli Schlachter <psychon@znc.in>"> <span class="fn">Uli Schlachter</span></a>
</span></b>
<pre>Thanks for the patch. However, it looks like it tries to fix a null pointer
dereference (SIGSEGV). However, this bug report is about an assertion failure
(SIGABRT).
The failing assertion is
assert (unscaled->base.hash_entry.hash == key.base.hash_entry.hash);
What the code does is: It first checks the cache (a hash table) for an entry.
If no entry is found, it creates a new unscaled font. The assertion here is
that the hash code of this new unscaled font is the same as what was used for
the negative lookup before.
The hash code is calculated based on the "id" argument to
_cairo_ft_unscaled_font_init(). However, your patch uses face->face_index
instead for calculating the hash code. Thus, if face->face_index != id, there
is a non-zero chance of a different hash code, which is not allowed.
Since your original patch replaced "0" with "face->face_index", why not replace
the "0" with "id" instead?
(Note that I still have no clue about this stuff, but I just looked at the code
that surrounded the assertion and then noticed that I ended up looking at
exactly the code that was changed in 42f07ef90).
By the way: Thank you Algunenano for the good bug report. The bisection was
very helpful.
Oh and: The commit message for 42f07ef90 says that ft_face->face_index changes
"underneath us" as font variations are applied. That sounds really, really
troublesome, since this means that the key of the hash table is changed without
updating the hash table?!?</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the QA Contact for the bug.</li>
</ul>
</body>
</html>