Thread View: gnu.utils.bug
1 messages
1 total messages
Started by Jim Meyering
Fri, 06 Nov 1992 15:34
regex-0.11 bug?
Author: Jim Meyering
Date: Fri, 06 Nov 1992 15:34
Date: Fri, 06 Nov 1992 15:34
36 lines
1377 bytes
1377 bytes
Summary: re_search hangs in infinite loop
Using regex.[ch] from the 0.11 distribution, the following program
doesn't terminate. The example is based on one from the tests in
GNU m4. I've tried this with {sun,sgi} and {gcc-2.3.1,cc} with -g.
The version of regex (rather old) that came with m4-1.0 showed
similar problems with gcc on an SGI.
--
Jim Meyering | Member of the League for Programming Freedom
meyering@cs.utexas.edu | Contact me or lpf@uunet.uu.net for more info.
----
#include <sys/types.h>
#include "regex.h"
#define REG_EXPR "\\w+"
#define STRING "a"
int
main ()
{
struct re_pattern_buffer pat_buf;
char *msg;
pat_buf.translate = 0;
pat_buf.fastmap = 0;
pat_buf.buffer = 0;
pat_buf.allocated = 0;
msg = re_compile_pattern (REG_EXPR, strlen (REG_EXPR), &pat_buf);
if (msg)
abort ();
re_search (&pat_buf, STRING, strlen (STRING), 0, strlen (STRING), 0);
exit (0);
}
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads