1. 21 Feb, 2022 3 commits
  2. 18 Feb, 2022 4 commits
  3. 17 Feb, 2022 1 commit
    • xdiff: use xdl_free not free · b722c45d
      We've added a lovely abstraction layer in xdiff so that it can call our
      allocation functions.  But it also needs to call our free functions.  We
      missed some `free` calls in `xmerge.c`.  Update them to use `xdl_free`.
      Without this, we will pass a pointer allocated with a custom allocator
      to the system free function.  💣
      Edward Thomson committed
  4. 14 Feb, 2022 4 commits
  5. 13 Feb, 2022 10 commits
  6. 12 Feb, 2022 12 commits
  7. 11 Feb, 2022 1 commit
  8. 09 Feb, 2022 5 commits
    • util: remove `p_mktemp` / `p_mkstemp` · b933c14a
      We have our own temporary file creation function now in
      `git_futils_mktmp`, remove the others since they may be terrible on some
      platforms.
      Edward Thomson committed
    • futils: use our random function for mktemp · 53063e77
      `mktemp` on mingw is exceedingly deficient, using a single monotonically
      increasing alphabetic character and the pid.  We need to use our own
      random number generator for temporary filenames.
      Edward Thomson committed
    • rand: introduce git_rand PRNG · 3c53796c
      Introduce `git_rand`, a PRNG based on xoroshiro256**, a fast,
      all-purpose pseudo-random number generator: https://prng.di.unimi.it
      
      The PRNG will be seeded by the system's entropy store when possible,
      falling back to current time and system data (pid, uptime, etc).
      Inspiration for this was taken from libressl, but since our PRNG is
      not used for cryptographic purposes (and indeed currently only generates
      a unique temp file name that is written in a protected directory),
      this should be more than sufficient.
      
      Our implementation of xoroshiro256** was taken almost strictly from
      the original author's sources, but was tested against PractRand to
      ensure that there were no foolish mistranslations:
      
      ```
      RNG_test using PractRand version 0.94
      RNG = RNG_stdin64, seed = unknown
      test set = core, folding = standard (64 bit)
      
      rng=RNG_stdin64, seed=unknown
      length= 256 megabytes (2^28 bytes), time= 2.9 seconds
        no anomalies in 210 test result(s)
      
      rng=RNG_stdin64, seed=unknown
      length= 512 megabytes (2^29 bytes), time= 6.2 seconds
        no anomalies in 226 test result(s)
      
      rng=RNG_stdin64, seed=unknown
      length= 1 gigabyte (2^30 bytes), time= 12.7 seconds
        no anomalies in 243 test result(s)
      
      rng=RNG_stdin64, seed=unknown
      length= 2 gigabytes (2^31 bytes), time= 25.4 seconds
        no anomalies in 261 test result(s)
      
      rng=RNG_stdin64, seed=unknown
      length= 4 gigabytes (2^32 bytes), time= 50.6 seconds
        no anomalies in 277 test result(s)
      
      rng=RNG_stdin64, seed=unknown
      length= 8 gigabytes (2^33 bytes), time= 104 seconds
        no anomalies in 294 test result(s)
      ```
      Edward Thomson committed