|
From: | Reuben Thomas |
Subject: | Re: [Bug-zile] Incremental search is dog slow in moderately-sized files |
Date: | Tue, 21 Jan 2014 12:12:16 +0000 |
It took several hours of debugging, but finally I discovered that estr:line calls astr:find with out-of-bounds arguments at the end of a loop, expecting to get back a `nil`. Adding guards to find and rfind and returning nil rather than letting memchr/memrchr race through random memory outside of the allocated buffer has fixed both my occasional crash in find, and the major test breakage in memrchr on Travis. There are probably other instances of that assumption, but I guess I'll have a better chance of teasing those out as I spec out the apis with Specl in the coming months.
You should be able to copy the memrchr + fallback code into Zee now to get a version that works on non-glibc systems :) I still need to fix it to work with CRLF line endings in Zile, but that isn't something Zee supports.
I'd be especially happy if you could confirm `make tests-check-local` mostly behaves on Linux with current master.
[Prev in Thread] | Current Thread | [Next in Thread] |