[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#63658: No longer reproducible (#63658)



Hi, I've also been unable to reproduce this bug. Currently, I have

ii  libc6          2.3.1-3        GNU C Library: Shared libraries and Timezone

The test program and the input file are attached. Here are some test runs: 

% a.out '^ {0,3}([|>:}#] ?){3}.*' test.in
>>> blah fasel
>>>> blah fasel
>>>>> blah fasel
>>>blah fasel
> > > fasel
> > > > fasel

% a.out '^ {0,3}([|>:}#] ?){2}.*' test.in
>> blah fasel
>>> blah fasel
>>>> blah fasel
>>>>> blah fasel
>>blah fasel
>>>blah fasel
> > fasel
> > > fasel
> > > > fasel


This seems to be correct now. Somebody else should confirm that this bug
has been fixed in libc 2.3.1. Also, the above output is identical when
used with grep (2.4.2-3).

Hope this helps.


T

-- 
Try to keep an open mind, but not so open your brain falls out. -- theboz
#include <stdio.h>
#include <regex.h>

int main (int argc, char *argv[])
{
  FILE *fp;
  regex_t preg;
  int ec;
 
  char buff[2048];
 
  if (argc == 2)
    fp = stdin;
  else if (argc == 3 && (fp = fopen (argv[2], "r")) == NULL)
  {
    perror (argv[2]);
    exit (1);
  }
  else if (argc > 3 || argc < 2)
    exit (1);
 
  if ((ec = regcomp (&preg, argv[1], REG_ICASE|REG_EXTENDED)) != 0)
  {
    char e[1024];
    regerror (ec, &preg, e, sizeof (e));
    fputs (e, stderr);
    exit (1);
  }
 
 
  while (fgets (buff, sizeof (buff), fp))
  {
    if (regexec (&preg, buff, 0, NULL, 0) == 0)
      fputs (buff, stdout);
  }
 
  fclose (fp);
  return 0;
}
 blah fasel
> blah fasel
>> blah fasel
>>> blah fasel
>>>> blah fasel
>>>>> blah fasel
>>blah fasel
>>>blah fasel
> > fasel
> > > fasel
> > > > fasel

Reply to: