diff options
author | Father Chrysostomos <sprout@cpan.org> | 2013-07-30 23:49:58 -0700 |
---|---|---|
committer | Father Chrysostomos <sprout@cpan.org> | 2013-08-25 12:23:59 -0700 |
commit | 49f55535e0b402f8cbdf839b5f2c88306c91a31d (patch) | |
tree | 53d85774d91296f9ee177a27425e7be58dcf2dd7 /embed.fnc | |
parent | a10eae290937db109954431d254a9a25287f190b (diff) | |
download | perl-49f55535e0b402f8cbdf839b5f2c88306c91a31d.tar.gz |
Stop substr re optimisation from rejecting long strs
Using I32 for the fields that record information about the location of
a fixed string that must be found for a regular expression to match
can result in match failures, because I32 is not large enough to store
offsets >= 2**31.
SSize_t is appropriate, since it is 64 bits on 64-bit platforms and 32
bits on 32-bit platforms.
This commit changes enough instances of I32 to SSize_t to get the
added test passing and suppress compiler warnings. A later commit
will change many more.
Diffstat (limited to 'embed.fnc')
-rw-r--r-- | embed.fnc | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -2045,9 +2045,9 @@ Esn |void |cl_and |NN struct regnode_charclass_class *cl \ Esn |void |cl_or |NN const struct RExC_state_t *pRExC_state \ |NN struct regnode_charclass_class *cl \ |NN const struct regnode_charclass_class *or_with -Es |I32 |study_chunk |NN struct RExC_state_t *pRExC_state \ +Es |SSize_t|study_chunk |NN struct RExC_state_t *pRExC_state \ |NN regnode **scanp|NN I32 *minlenp \ - |NN I32 *deltap|NN regnode *last \ + |NN SSize_t *deltap|NN regnode *last \ |NULLOK struct scan_data_t *data \ |I32 stopparen|NULLOK U8* recursed \ |NULLOK struct regnode_charclass_class *and_withp \ |