You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The program crashed with:
This is definitely a bug in the roc-lang/unicode package, caused by an unhandled edge case in grapheme text segmentation.
It is difficult to track down and catch every possible combination, so it would be helpful if you could log this as an issue with a reproduction.
Grapheme.split state machine state at the time was:
((AfterZWJ <opaque>), [8205, 4417], [ZWJ, L])
Here is the call stack that led to the crash:
roc.panic
Grapheme.splitHelp
Grapheme.(anonymous function)
Result.try
Grapheme.split
app.(anonymous function)
Task.(anonymous function)
.(anonymous function)
rust.main
Optimizations can make this list inaccurate! If it looks wrong, try running without `--optimize` and with `--linker=legacy`
Here are a list of examples that crash this function:
They all contain U+200D the zero-width joiner character, so that's probably the source of the crash.
These examples were found by running the radamsa fuzzer using the examples in the GraphemeBreakTest data file. Hopefully this fuzz testing could be automated in the future as mentioned in #7.
The text was updated successfully, but these errors were encountered:
The
Grapheme.split
function crashes on some edge-cases, for example, running:Crashes with the output:
Here are a list of examples that crash this function:
They all contain
U+200D
the zero-width joiner character, so that's probably the source of the crash.These examples were found by running the radamsa fuzzer using the examples in the GraphemeBreakTest data file. Hopefully this fuzz testing could be automated in the future as mentioned in #7.
The text was updated successfully, but these errors were encountered: