redict/tests/support
yoav-steinberg c7dc17fc0f
Fix possible int overflow when hashing an sds. (#9916)
This caused a crash when adding elements larger than 2GB to a set (same goes for hash keys). See #8455.

Details:
* The fix makes the dict hash functions receive a `size_t` instead of an `int`. In practice the dict hash functions
  call siphash which receives a `size_t` and the callers to the hash function pass a `size_t` to it so the fix is trivial.
* The issue was recreated by attempting to add a >2gb value to a set. Appropriate tests were added where I create
  a set with large elements and check basic functionality on it (SADD, SCARD, SPOP, etc...).
* When I added the tests I also refactored a bit all the tests code which is run under the `--large-memory` flag.
  This removed code duplication for the test framework's `write_big_bulk` and `write_big_bulk` code and also takes
  care of not allocating the test frameworks helper huge string used by these tests when not run under `--large-memory`.
* I also added the _violoations.tcl_ unit tests to be part of the entire test suite and leaned up non relevant list related
  tests that were in there. This was done in this PR because most of the _violations_ tests are "large memory" tests.
2021-12-13 21:16:25 +02:00
..
benchmark.tcl Added URI support to redis-benchmark (cli and benchmark share the same uri-parsing methods) (#9314) 2021-09-14 19:45:06 +03:00
cli.tcl Improve bind and protected-mode config handling. (#9034) 2021-06-22 12:50:17 +03:00
cluster.tcl Add support for plaintext clients in TLS cluster (#8587) 2021-03-30 23:11:32 +03:00
redis.tcl Add support for list type to store elements larger than 4GB (#9357) 2021-11-03 20:47:18 +02:00
server.tcl Connection leak in external tests. (#9777) 2021-11-15 11:07:43 +02:00
test.tcl Archive external redis log in external tests (#9765) 2021-11-11 13:04:02 +02:00
tmpfile.tcl Initial implementation of a client-server parallel testing system for Redis in order to speedup execution of the test suite. 2011-07-10 23:25:48 +02:00
util.tcl Fix possible int overflow when hashing an sds. (#9916) 2021-12-13 21:16:25 +02:00