Jim Meyering wrote: Actually, we need yet another byte at the end, and one more prior:
> When I built with ASAN and rawhide's gcc version 4.9.1 20140930 > (Red Hat 4.9.1-11) (GCC), using this command: > > make CFLAGS=-ggdb3 AM_CFLAGS=-fsanitize=address \ > AM_LDFLAGS='-fsanitize=address -static-libasan' check > > I saw two test failures. You can see that the first test triggers an access > one past the end, and all others trigger an access one prior to the beginning. > Here is a summary of the problems: Thanks, if begline option (-x) is set, one more prior is used. OTOH, for an access one past the end, I believe the another patch attached with this bug fixes it. dfaexec for non-UTF8 locales doesn't check the end of an input buffer and doesn't count newline correctly.