Package: grep Version: 2.5.1.ds1-4 Severity: normal I was under the impression that I had reported this bug long ago, and that it had been fixed after some time, but I haven't been able to find it in the BTS, so I guess I was wrong.
Using back references as in the expression: '^(.?)(.?)(.?)(.?).\4\3\2\1$', causes grep to misbehave. Some examples (I'm using LANG=C to prevent any locale problems): *** $ LANG=C egrep '^(.?)(.?)(.?)(.?).\4\3\2\1$' /usr/share/dict/spanish a grep: regexec.c:1244: pop_fail_stack: Assertion `num >= 0' failed. Abortado $ LANG=C egrep '^(.)(.?)(.?)(.?).\4\3\2\1$' /usr/share/dict/spanish grep: regexec.c:1244: pop_fail_stack: Assertion `num >= 0' failed. Abortado *** These two don't work, and they give a reference to where the problem might be located. Now, taking one more question mark out, makes it work: *** $ time LANG=C egrep '^(.)(.)(.?)(.?).\4\3\2\1$' /usr/share/dict/spanish adamada afufa anilina anona arenera nomon ososo radar rajar rapar rasar rayar razar recocer reconocer rever rodador rotor yatay real 0m3.990s user 0m3.412s sys 0m0.013s *** It takes a lot of time, when doing a normal grep that does not use back references on the same file: *** $ time LANG=C egrep '^rec.*cer$' /usr/share/dict/spanish recocer reconocer reconvalecer recrecer recrudecer real 0m0.015s user 0m0.007s sys 0m0.006s *** Takes almost no time. I _think_ this bug was not present in woody. I'm pretty sure that I successfully executed the back-references regexp some years ago, although I don't remember when it was that it broke. Please, do have a look at it. Love, Margarita Manterola -- System Information: Debian Release: 3.1 APT prefers testing APT policy: (600, 'testing') Architecture: i386 (i686) Kernel: Linux 2.6.8-1-k7 Locale: LANG=es_AR, LC_CTYPE=es_AR (charmap=ISO-8859-1) Versions of packages grep depends on: ii libc6 2.3.2.ds1-20 GNU C Library: Shared libraries an -- no debconf information -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]