File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -95,7 +95,16 @@ TEST_F(RegexTest, Bug20642505)
95
95
int err;
96
96
size_t len= 684 * 1024 * 1024 ;
97
97
98
- if ((sizeof (size_t ) > 4 ) && (sizeof (long ) > 4 ))
98
+ /*
99
+ We're testing on 32-bit/32-bit only. We could test e.g. with
100
+ 64-bit size_t, 32-bit long (for 64-bit Windows and such), but
101
+ then we'd have to allocate twice as much memory, and it's a
102
+ bit heavy as it is. (In 32/32, we exceed the size_t parameter
103
+ to malloc() as new_ssize exceeds UINT32 / 4, whereas in 64/32,
104
+ new_ssize would exceed LONG_MAX at UINT32 / 2. (64/32 verified
105
+ in debugger.)
106
+ */
107
+ if ((sizeof (size_t ) > 4 ) || (sizeof (long ) > 4 ))
99
108
return ;
100
109
101
110
/* set up an empty C string as pattern as regcomp() will strlen() this */
You can’t perform that action at this time.
0 commit comments