On 05/16/2014 11:13 AM, Jim Meyering wrote:
Thanks for tracking that down. This sounds like it will deserve compile/run tests so that gnulib-using projects will detect the bug and use the replacement functions.

Thanks, good idea.

gnulib/tests/test-mbrtowc.c has test cases for zero-length input that explicitly allow mbrtowc to return 0 (glibc behavior) or (size_t) -1 (AIX 5.1 behavior). My guess is that Bruno didn't get around to installing a fix for these bugs, perhaps because he didn't think it important enough. But this 'grep' failure has given me motivation to fix it, so I plan to do that soon in gnulib.

I won't install any change to grep for this right now, as we're close to a release and the existing grep code should be correct (albeit perhaps a bit slower) regardless of whether gnulib is fixed.

Reply via email to