Uploaded image for project: 'Apache Arrow'
  1. Apache Arrow
  2. ARROW-10287

[C++] Avoid std::random_device whenever possible

    XMLWordPrintableJSON

Details

    • Wish
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • None
    • 2.0.0
    • C++

    Description

      I just tried running the tests on a default build on Ubuntu 20.04 with an AMD Ryzen CPU (where presumably RDRAND can't be relied on, but I don't know if that's the underlying reason), and the tests appear to hand blocking on std::random_device at some point. I suppose some versions of libstdc++ will use /dev/random instead of /dev/urandom (which is a bad idea in itself).

      We should probably try to minimize our usage of std::random_device. After all, we're not generating cryptographic keys or anything.

      Attachments

        Issue Links

          Activity

            People

              apitrou Antoine Pitrou
              apitrou Antoine Pitrou
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 1.5h
                  1.5h