summaryrefslogtreecommitdiff
path: root/ext/gmp/tests
Commit message (Collapse)AuthorAgeFilesLines
* Skip on Travis-CIAnatol Belski2018-01-031-0/+1
| | | | | | | | The current doc states max ram for a test VM would be 7.5G, the currently used container image has even less. This skip should be revisited, as the available memory amount shifts. The way of checking /proc/meminfo doesn't work reliably on containers at least, thus skipping explicitly on Travis-CI makes sense.
* Extend skip sectionAnatol Belski2018-01-031-1/+16
| | | | | The test requires some untrivial amount of RAM. Added a simple check for the system free RAM to avoid false positive fails.
* Fix some int/long confusion issues in GMPStanislav Malyshev2018-01-021-0/+26
| | | | | | mpz_setbit seems to have limit of INT_MAX * GMP_NUMB_BITS on the number of bits supported, and will abort() if that limit is exceeded.
* Fix #72948: Uncatchable "Catchable" fatal error for class to string conversionsChristoph M. Becker2016-09-031-1/+1
| | | | | | | E_RECOVERABLE errors are reported as "Catchable fatal error". This is misleading, because they actually can't be caught via try-catch statements. Therefore we change the wording to "Recoverable fatal error" as suggested by Nikita.
* Fix GMP unserialization with self-referenceNikita Popov2016-07-251-0/+14
|
* Merge branch 'PHP-5.6' into PHP-7.0Xinchen Hui2016-03-171-1/+1
|\ | | | | | | | | * PHP-5.6: Fixed test script
| * Fixed test scriptXinchen Hui2016-03-171-1/+1
| |
* | Split test into different versions for 32-bit and 64-bit systemsDmitry Stogov2015-10-072-0/+231
| |
* | Merge branch 'PHP-5.6'Stanislav Malyshev2015-09-021-0/+50
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * PHP-5.6: (21 commits) fix unit tests update NEWS add NEWS for fixes Improve fix for #70172 Fix bug #70312 - HAVAL gives wrong hashes in specific cases fix test add test Fix bug #70366 - use-after-free vulnerability in unserialize() with SplDoublyLinkedList Fix bug #70365 - use-after-free vulnerability in unserialize() with SplObjectStorage Fix bug #70172 - Use After Free Vulnerability in unserialize() Fix bug #70388 - SOAP serialize_function_call() type confusion Fixed bug #70350: ZipArchive::extractTo allows for directory traversal when creating directories Improve fix for #70385 Fix bug #70345 (Multiple vulnerabilities related to PCRE functions) Fix bug #70385 (Buffer over-read in exif_read_data with TIFF IFD tag byte value of 32 bytes) Fix bug #70219 (Use after free vulnerability in session deserializer) Fix bug ##70284 (Use after free vulnerability in unserialize() with GMP) Fix for bug #69782 Add CVE IDs asigned (post release) to PHP 5.4.43 Add CVE IDs asigned to #69085 (PHP 5.4.39) ... Conflicts: ext/exif/exif.c ext/gmp/gmp.c ext/pcre/php_pcre.c ext/session/session.c ext/session/tests/session_decode_variation3.phpt ext/soap/soap.c ext/spl/spl_observer.c ext/standard/var.c ext/standard/var_unserializer.c ext/standard/var_unserializer.re ext/xsl/xsltprocessor.c
| * Fix bug ##70284 (Use after free vulnerability in unserialize() with GMP)Stanislav Malyshev2015-08-231-0/+50
| |
* | Merge branch 'PHP-5.6'Nikita Popov2015-06-112-2/+24
|\ \ | |/
| * Fixed bug #69803Nikita Popov2015-06-112-2/+24
| |
* | Merge branch 'PHP-5.6'Nikita Popov2015-04-163-5/+5
|\ \ | |/ | | | | | | Conflicts: ext/gmp/gmp.c
| * Run gmp_random tests more quicklyNikita Popov2015-04-162-4/+4
| |
| * Normalize gmp_remroot() behavior to GMP 5.1Nikita Popov2015-04-161-1/+1
| |
| * We can't output absolute S and T values for theRasmus Lerdorf2015-01-091-21/+11
| | | | | | | | | | | | | | Diophantine solution here since it can vary based on the libgmp version we are linking against and in general there are almost always multiple valid solutions
* | We can't output absolute S and T values for theRasmus Lerdorf2015-01-091-21/+11
| | | | | | | | | | | | | | Diophantine solution here since it can vary based on the libgmp version we are linking against and in general there are almost always multiple valid solutions
* | Use "float" and "integer" in typehint and zpp errorsAndrea Faulds2014-12-213-9/+9
| |
* | gmp_random_seed()Leigh2014-10-191-0/+229
| |
* | Merge branch 'PHP-5.6'Stanislav Malyshev2014-10-142-0/+126
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | * PHP-5.6: update NEWS and UPGRADING Upated NEWS Address issues raised by @nikic Make sure min < max Mersenne Twister was added in GMP 4.2 Add test files Add gmp_random_bits(bits) and gmp_random_range(min, max) Change GMPs default PRNG to Mersenne Twister Conflicts: ext/gmp/gmp.c
| * Address issues raised by @nikicLeigh2014-09-242-4/+96
| | | | | | | | | | | | | | | | - Thread safety on rand init function. - Ret false on validation failure - Add _dep of temp_a to temp_b - Special case int sized min values - More tests!
| * Make sure min < maxLeigh2014-09-241-0/+4
| |
| * Add test filesLeigh2014-09-232-0/+30
| |
* | Drop support for GMP 4.1Nikita Popov2014-09-281-1/+0
| | | | | | | | | | | | * Consistent base conversion support (max: 62) * mpz_remroot always available * Use gmp_randinit_mt instead of LCG
* | Make gmp_setbit and gmp_clrbit return values consistentLeigh2014-09-282-4/+6
| |
* | Merge branch 'PHP-5.6'Nikita Popov2014-09-0443-139/+230
|\ \ | |/ | | | | | | Conflicts: ext/soap/php_http.c
| * Split GMP tests testing multiple functionsNikita Popov2014-09-045-142/+140
| | | | | | | | Also drop dummy test
| * Give proper names to GMP test filesNikita Popov2014-09-0437-0/+0
| |
| * Throw warnings when using zero modulus in gmp_powmNikita Popov2014-09-041-0/+9
| | | | | | | | Also fixes a leak in this case.
| * Add GMP tests for some uncovered branchesNikita Popov2014-09-045-8/+92
| |
* | Merge branch 'PHP-5.6'Nikita Popov2014-09-021-0/+18
|\ \ | |/ | | | | | | Conflicts: ext/gmp/gmp.c
| * Fixed bug #50175Nikita Popov2014-09-021-0/+18
| | | | | | | | | | | | 0x and 0b prefix is now only handled if either no base is given or if the base is 16 (0x) or 2 (0b). Always handling it is incorrect because 0x and 0b are perfectly valid numbers in other bases.
* | Skip 64bit test on 32bitNikita Popov2014-09-021-1/+4
| | | | | | | | Also minor type improvements
* | add a test with gmp and PHP_INT_MAXAnatol Belski2014-09-021-0/+26
|/
* Implement gmp_import() and gmp_export()Leigh2014-09-021-0/+151
|
* Add SKIPIF in GMP testNikita Popov2014-03-121-0/+2
|
* Add tests for bug #66872 and gmp_[rem]rootNikita Popov2014-03-112-0/+158
|
* add T_POW (**) operatordatibbaw2014-02-061-1/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixed recognition of the operator Added opcode, still doing multiply instead of pow() opcode now always returns int(42) The right answer, but always a float Yanked code from pow() implementation. Should not handle negative long as exponent ourselves Added test cases from pow() Moved precedence higher than '~' Added GMP operator overloading Added ZEND_ASSIGN_POW (**=) operator. Added pow() as a language construct. Adjusted test cases for changed precedence. Reduced pow() to shell function around ZEND_API pow_function() Reduced test case to only contain edge cases Added overloading test case Moved unary minus above T_POW Revert "Added pow() as a language construct." Bad bad bad idea. This reverts commit f60b98cf7a8371233d800a6faa286ddba4432d02. Reverted unary minus behaviour due to previous revert. Convert arrays to int(0) Exponent with array as a base becomes int(0) Rebase against master Fixed tokenizer test case
* Throw warning when converting invalid string to GMPNikita Popov2013-12-3013-1/+35
|
* Fix bug #65997 by switching to Serializable for GMPNikita Popov2013-10-292-1/+36
| | | | | | | | | | | Rather than using get_properties and __wakeup for serialization the code now uses Serializable::serialize() and Serializable::unserialize(). The get_properties handler is switched to a get_debug_info handler. Thus get_gc will now return only the normal properties and not do any modifications, thus fixing the leak. This also avoids a $num property from being publicly visible after the object was dumped or serialized, so that's an extra plus.
* GMP improvementsNikita Popov2013-06-1717-149/+555
| | | | As per RFC https://wiki.php.net/rfc/operator_overloading_gmp
* fixing test for upcoming mpir upgradeAnatoliy Belsky2012-08-234-141/+0
| | | | - mpir is going to be upgraded up to 2.5.1 on windows
* Fixed bug #62068 Test bug - gmp_nextprime and 022Matt Ficken2012-05-214-2/+145
|
* Fix bug #52906 gmp_mod returns negative result when non-negative is expectedStanislav Malyshev2010-10-015-11/+58
|
* Also allow base 62 for gmp_init as requested in (#50283)David Soria Parra2009-11-251-1/+4
|
* Really use 62 as the upper boundary as requested and not 32.David Soria Parra2009-11-251-11/+15
|
* Implement feature request #50283 (allow base in gmp_strval to use full ↵David Soria Parra2009-11-241-0/+29
| | | | range: 2 to 62, and -2 to -36)
* fix testsNuno Lopes2007-12-272-3/+3
|
* add tests for testbit, sync with HEADStanislav Malyshev2007-11-012-24/+84
|
* generalize resource namesStanislav Malyshev2007-11-011-2/+2
|