shepmaster / jetscii

A tiny library to efficiently search strings for sets of ASCII characters and byte slices for sets of bytes.
Apache License 2.0
113 stars 20 forks source link

potential segfault when using find #44

Closed martony38 closed 2 years ago

martony38 commented 2 years ago

I have a program that generate a word document from a json payload (cannot share/private repo). That program segfaults about ~1-2% of the time.

I have traced the segfault to the find method from jetscii::Bytes in 1 of the dependency https://github.com/PoiScript/strong-xml/blob/db2306cdb62b1ea5d020575ed9d7ee0318e09e17/strong-xml/src/xml_escape.rs#L12.

Here are 2 example values I was able to print of the raw variable before the segfault happened:

environment

MacOS 10.15.7 rustc 1.55.0 (c8dfcfe04 2021-09-06)

shepmaster commented 2 years ago

This is a very unfortunate bug report. I'd like to take it with maximum importance, but there's nothing for me to go on. This crate already attempts to do a wide range of tests to exercise edge conditions.