Memory stress test for UtfNormal issue re bug 28146
authorBrion Vibber <brion@users.mediawiki.org>
Fri, 1 Apr 2011 21:14:52 +0000 (21:14 +0000)
committerBrion Vibber <brion@users.mediawiki.org>
Fri, 1 Apr 2011 21:14:52 +0000 (21:14 +0000)
commit3571ccc924cc9fe2bf1861afebac67e966e26b11
tree5192a324a25fc4ed4fcb32db82261e7ebc06f647
parent72aec9cc8fbfe511921d7ebb06be4551c8ecf9b0
Memory stress test for UtfNormal issue re bug 28146

This pulls the source texts used for the UtfNormalBench.php benchmarks, repeats them into much larger strings, and attempts to reproduce an out-of-memory error in the middle of UtfNormal::cleanUp():

$ php
Testing testdata/washington.txt (English text)...
     quickIsNFCVerify 1078.3ms   14,969,652 bytes/s (changed)
              cleanUp  992.1ms   16,270,594 bytes/s (no change)
Testing testdata/berlin.txt (German text)...
PHP Fatal error:  Allowed memory size of 136314880 bytes exhausted (tried to allocate 71 bytes) in /var/www/trunk/includes/normal/UtfNormal.php on line 285

Exact failure point may require adjustment depending on platform, etc.
includes/normal/UtfNormalMemStress.php [new file with mode: 0644]