public inbox for libc-hacker@sourceware.org
 help / color / mirror / Atom feed
* regcomp failure
@ 2002-12-13 11:09 Philip Blundell
  2002-12-13 13:33 ` Roland McGrath
  0 siblings, 1 reply; 2+ messages in thread
From: Philip Blundell @ 2002-12-13 11:09 UTC (permalink / raw)
  To: libc-hacker

This test program appears to consume all memory and eventually crash
when run with the latest libc from cvs.

p.

--

#include <error.h>
#include <sys/types.h>
#include <regex.h>
#include <stdio.h>
#include <stdlib.h>

int
main (void)
{
  regex_t re;
  regmatch_t ma[2];
  int reerr;
  int res = 0;

  reerr = regcomp (&re, "^6?3?[25]?5?[14]*[25]*[69]*+[58]*87?4?$",REG_EXTENDED | REG_NOSUB);
  if (reerr != 0)
    {
      char buf[100];
      regerror (reerr, &re, buf, sizeof buf);
      error (EXIT_FAILURE, 0, buf);
    }

  exit (0);
}

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: regcomp failure
  2002-12-13 11:09 regcomp failure Philip Blundell
@ 2002-12-13 13:33 ` Roland McGrath
  0 siblings, 0 replies; 2+ messages in thread
From: Roland McGrath @ 2002-12-13 13:33 UTC (permalink / raw)
  To: Philip Blundell; +Cc: libc-hacker, Isamu Hasegawa

> This test program appears to consume all memory and eventually crash
> when run with the latest libc from cvs.

Thanks for the report.  I've put the test case into libc (along with a hack
to the test infrastructure so it will fail with a resource limit instead of
swallowing the machine).  Isamu will have to look at the regex bug itself.

posix/bug-regex15 is an expected failure until we get that fix.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2002-12-13 21:33 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-12-13 11:09 regcomp failure Philip Blundell
2002-12-13 13:33 ` Roland McGrath

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).