[LLVMbugs] [Bug 8787] New: Support/Regex is unaware of LLP64(Win64)
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Tue Dec 14 02:44:29 PST 2010
http://llvm.org/bugs/show_bug.cgi?id=8787
Summary: Support/Regex is unaware of LLP64(Win64)
Product: libraries
Version: trunk
Platform: PC
OS/Version: Windows XP
Status: NEW
Severity: normal
Priority: P
Component: Support Libraries
AssignedTo: unassignedbugs at nondot.org
ReportedBy: geek4civic at gmail.com
CC: llvmbugs at cs.uiuc.edu
in regexec.c:
/* macros for manipulating states, small version */
#define states long /* i32 */
#define states1 states
#include "regengine.inc"
/* now undo things */
#undef states
/* macros for manipulating states, large version */
#define states char *
if (g->nstates <= (long)(CHAR_BIT*sizeof(states1)) ...
"states1" is expanded as "char *", and the condition becomes true
even if nstates > 32. Then regex might behave buggy.
Workaround:
--- a/lib/Support/regexec.c
+++ b/lib/Support/regexec.c
@@ -54,8 +54,8 @@
#include "regex2.h"
/* macros for manipulating states, small version */
-#define states long
-#define states1 states /* for later use in llvm_regexec()
decision */
+#define states1 long /* for later use in llvm_regexec()
decision */
+#define states states1
#define CLEAR(v) ((v) = 0)
#define SET0(v, n) ((v) &= ~((unsigned long)1 << (n)))
#define SET1(v, n) ((v) |= (unsigned long)1 << (n))
--
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
More information about the llvm-bugs
mailing list