Thanks, that is due to an already known bug in glibc; see: https://sourceware.org/bugzilla/show_bug.cgi?id=18986 https://debbugs.gnu.org/21513 To work around the problem with grep, use './configure --with-included-regex' when building grep, or encourage your upstream distributor to do so (or better yet, to fix glibc). You might also follow up on the glibc bug report to mention that the problem affects you too. In the meantime I installed the attached patch, to add your test case to grep's test suite. The test is expected to fail if glibc regex is used.