You are viewing a plain text version of this content. The canonical link for it is here.
Posted to regexp-dev@jakarta.apache.org by bu...@apache.org on 2001/09/28 23:43:02 UTC
DO NOT REPLY [Bug 3877] New: -
{n} and {n,m} not thread safe
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=3877>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND
INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=3877
{n} and {n,m} not thread safe
Summary: {n} and {n,m} not thread safe
Product: Regexp
Version: unspecified
Platform: Sun
OS/Version: Solaris
Status: NEW
Severity: Normal
Priority: Other
Component: Other
AssignedTo: regexp-dev@jakarta.apache.org
ReportedBy: dougpardee@yahoo.com
In a multi-threaded environment, the REProgram produced by RECompiler for a
regexp containing {n} or {n,m} is unreliable.
Class RECompiler uses static variables and arrays to process the {n} and {n,m}
specifications. These static variables and arrays are being modified without
any synchronization between threads.
The variables in question are:
static int brackets = 0; // Number of bracket sets
static int[] bracketStart = null; // Starting point
static int[] bracketEnd = null; // Ending point
static int[] bracketMin = null; // Minimum number of matches
static int[] bracketOpt = null; // Additional optional matches