-
Notifications
You must be signed in to change notification settings - Fork 37
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Assertion failure #142
Comments
Does the same font/text crash HB by any chance? That piece of code is the nastiest part of OT / HB. |
No crash in HB, no. I'll try adding some debugging prints around the values of |
The problem is this line:
In this case, |
I'm getting confused between harfruzz and rustybuzz. Fix in harfbuzz/harfruzz#15 |
Will open a PR for here with a test case. |
There are a few other instances of this exact construct as well as a large number of |
I think the problem is that in HB, |
Yes, |
@behdad In fixing the integer type to track HB's implementation I have a question about this from HB: static bool match_lookahead (hb_ot_apply_context_t *c,
unsigned int count,
const HBUINT lookahead[],
match_func_t match_func,
const void *match_data,
unsigned int start_index,
unsigned int *end_index)
{
TRACE_APPLY (nullptr);
hb_ot_apply_context_t::skipping_iterator_t &skippy_iter = c->iter_context;
skippy_iter.reset (start_index - 1); My C isn't very good so I don't claim to understand the implications on that side (maybe the iterator doesn't care about being reset to a negative value?), but on the Rust side it seems suspicious. The Is there any potential of this being called with a starting index of 0? |
No. Because |
An assert it is. A bit latter on (again from HB code): unsigned int last_num_components = _hb_glyph_info_get_lig_num_comps (&buffer->cur());
unsigned int components_so_far = last_num_components;
// both numbers get manipulated, then later...
unsigned int new_lig_comp = components_so_far - last_num_components + hb_min (this_comp, last_num_components); Should I just |
If you check out how they are manipulated, |
That makes sense, and my PR is asserting it now as well. I did just spot another instance of a type mismatch (the |
I'm having a problem with rustbuzz crashing inside of diffenator3 for a particular font (NotoSansMalayalam[wdth,wght].ttf.gz).
Here's a reproducer:
And here's the backtrace:
The text was updated successfully, but these errors were encountered: