It'd be nice if someone could fix regex bugs like these in the glibc regex code, but nobody has stepped forward to do that, and frankly it's low priority. In the meantime, don't write Awk scripts with adversarial regexps.
In glibc (and Gnulib) the regular-expression code has long been
maintained under the philosophy that the code cannot handle arbitrary
regular expressions. Any code that lets the user specify an arbitrary
regular expression is suspect, and this includes Awk scripts. (This is
also true for C libraries other than glibc/Gnulib.)
- Forwarded: Segmentation Fault via recursive loop in Gawk arnold
- Re: Forwarded: Segmentation Fault via recursive loop in ... Paul Eggert