summaryrefslogtreecommitdiff
path: root/t/bigmem
Commit message (Collapse)AuthorAgeFilesLines
* t/bigmem/subst.t: Delete bogus commentFather Chrysostomos2014-12-241-2/+0
| | | | Accidentally copied from regexp.t
* [perl #103260] Fix s/// with long stringsFather Chrysostomos2014-12-231-0/+23
| | | | | | | | | | | | | | | | | This is also the subject of perl #123071. The iteration count was stored in an I32 and was overflowing. If the maximum number of iterations possible overflowed, then it would become negative, and the substitution would fail immediately with ‘Substitu- tion loop’. I tried fixing this without increasing the size of the context stack entries on 64-bit builds (by skipping the loop check for long strings), but was unable to, because we have to return the number of iterations, which was also stored as I32. If we change just that one to SSize_t, we get an I32-sized alignment hole, so we might as well make maxiters a SSize_t as well, fixing the bug that way (the more straightforward way).
* Test preamble: explicit @INC, instead of unshift.Jarkko Hietaniemi2014-10-085-5/+5
| | | | Exception: t/run/switchI.t, needs the unshift way.
* Test preamble: unify chdir 't' if -d 't';Jarkko Hietaniemi2014-10-085-5/+5
|
* fix the I32 bug for index() and rindex()Tony Cook2014-05-281-0/+37
|
* Stop substr re optimisation from rejecting long strsFather Chrysostomos2013-08-251-1/+5
| | | | | | | | | | | | | | 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.
* Make @- and @+ return correct offsets beyond 2**31Father Chrysostomos2013-08-251-1/+3
|
* Make $' work past the 2**31 thresholdFather Chrysostomos2013-08-251-1/+4
|
* [perl #116907] Allow //g matching past 2**31 thresholdFather Chrysostomos2013-08-251-2/+10
| | | | | | | | | Change the internal fields for storing positions so that //g in scalar context can move past the 2**31 character threshold. Before this com- mit, the numbers would wrap, resulting in assertion failures. The changes in this commit are only enough to get the added test pass- ing. Stay tuned for more.
* Stop minlen regexp optimisation from rejecting long stringsFather Chrysostomos2013-08-251-0/+22
| | | | | | | | | | This fixes #112790 and part of #116907. The length of the string is cast to I32, so it wraps and end up less than the minimum length. For now, simply skip this optimisation if minlen itself wraps and becomes negative.
* [perl #72766] Allow huge pos() settingsFather Chrysostomos2013-07-231-0/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is part of #116907, too. It also fixes #72924 as a side effect; the next commit will explain. The value of pos($foo) was being stored as an I32, not allowing values above I32_MAX. Change it to SSize_t (the signed equivalent of size_t, representing the maximum string length the OS/compiler supports). This is accomplished by changing the size of the entry in the magic struct, which is the simplest fix. Other parts of the code base can benefit from this, too. We actually cast the pos value to STRLEN (size_t) when reading it, to allow *very* long strings. Only the value -1 is special, meaning there is no pos. So the maximum supported offset is 2**sizeof(size_t)-2. The regexp engine itself still cannot handle large strings, so being able to set pos to large values is useless right now. This is but one piece in a larger puzzle. Changing the size of mg->mg_len also requires that Perl_hv_placeholders_p change its type. This function should in fact not be in the API, since it exists solely to implement the HvPLACEHOLDERS macro. See <https://rt.perl.org/rt3/Ticket/Display.html?id=116907#txn-1237043>.
* [rt #111730] don't use I32 for offsets in vec()Tony Cook2012-05-211-3/+1
| | | | | | do_vecset() do_vecget() used I32 for the offset, which meant that offsets outside the -2Gb - +2Gb offset were truncated, resulting in various misbehaviours.
* [rt #111730] TODO tests for vec() with large offsetsTony Cook2012-05-211-0/+36
|
* [rt #100514] regression test for read() with a 2Gib offsetTony Cook2012-05-211-0/+24