httpd-bugs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 31858] - regular expression matching broken on amd64
Date Wed, 03 Nov 2004 19:06:25 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=31858>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=31858

regular expression matching broken on amd64





------- Additional Comments From sbeck@gossamer-threads.com  2004-11-03 19:06 -------
Thanks Joe. I've been messing with that code for the last day and found a
solution. The version of the engine.c functions for "small" op regexs does not
work with 64 bit integers. A simple fix is to change regexec.c line 137 from:
if (g->nstates <= CHAR_BIT*sizeof(states1) && !(eflags&REG_LARGE))
to:
if (g->nstates <= CHAR_BIT*4 && !(eflags&REG_LARGE))

On an opteron sizeof(states1) is always 8 but the smatcher function, for some
unknown reason, will not handle a regex with more than 32 states. A better fix
would be to find the reason why smatcher will not work with more than 32 states
on a opteron but this fix is fine for me.

Cheers,

Scott

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


Mime
View raw message