foundationdb icon indicating copy to clipboard operation
foundationdb copied to clipboard

Fix incorrect range in randomSkewedUInt32()

Open sfc-gh-jshim opened this issue 3 years ago • 6 comments

Currently it invokes pow(10, uniform_rand(log_e(range_begin), log_e(range_end))), which may overflow beyond UINT32_MAX. Fix it by preventing log_e(0) case and change pow base to M_E

Fixes https://github.com/apple/foundationdb/issues/7856

Code-Reviewer Section

The general guidelines can be found here.

Please check each of the following things and check all boxes before accepting a PR.

  • [ ] The PR has a description, explaining both the problem and the solution.
  • [ ] The description mentions which forms of testing were done and the testing seems reasonable.
  • [ ] Every function/class/actor that was touched is reasonably well documented.

For Release-Branches

If this PR is made against a release-branch, please also check the following:

  • [ ] This change/bugfix is a cherry-pick from the next younger branch (younger release-branch or main if this is the youngest branch)
  • [ ] There is a good reason why this PR needs to go into a release branch and this reason is documented (either in the description above or in a linked GitHub issue)

sfc-gh-jshim avatar Jul 24 '22 21:07 sfc-gh-jshim

Doxense CI Report for Windows 10

  • Commit ID: 742b73028cf8792a60f7e38795df2db855632f08
  • Result: :x: FAILED
  • Build Logs (available for 30 days)

fdb-windows-ci avatar Jul 24 '22 21:07 fdb-windows-ci

Result of foundationdb-pr-macos on macOS BigSur 11.5.2

  • Commit ID: 742b73028cf8792a60f7e38795df2db855632f08
  • Duration 0:42:50
  • Result: :white_check_mark: SUCCEEDED
  • Error: N/A
  • Build Logs (available for 30 days)

foundationdb-ci avatar Jul 24 '22 21:07 foundationdb-ci

Result of foundationdb-pr on Linux CentOS 7

  • Commit ID: 742b73028cf8792a60f7e38795df2db855632f08
  • Duration 0:56:00
  • Result: :white_check_mark: SUCCEEDED
  • Error: N/A
  • Build Logs (available for 30 days)

foundationdb-ci avatar Jul 24 '22 22:07 foundationdb-ci

Result of foundationdb-pr-cluster-tests on Linux CentOS 7

  • Commit ID: 742b73028cf8792a60f7e38795df2db855632f08
  • Duration 2:24:46
  • Result: :x: FAILED
  • Error: Error while executing command: make -C tests -kj run. Reason: exit status 2
  • Build Logs (available for 30 days)

foundationdb-ci avatar Jul 24 '22 23:07 foundationdb-ci

Result of foundationdb-pr on Linux CentOS 7

  • Commit ID: e57d3a6f9b047507a4f1994f1732a83ed305a3ee
  • Duration 0:08:46
  • Result: :x: FAILED
  • Error: Error while executing command: ninja -v -C build_output -j ${NPROC} all packages strip_targets. Reason: exit status 1
  • Build Logs (available for 30 days)

foundationdb-ci avatar Aug 12 '22 08:08 foundationdb-ci

Result of foundationdb-pr-cluster-tests on Linux CentOS 7

  • Commit ID: e57d3a6f9b047507a4f1994f1732a83ed305a3ee
  • Duration 0:09:29
  • Result: :x: FAILED
  • Error: Error while executing command: ninja -v -C build_output -j ${NPROC} all packages strip_targets. Reason: exit status 1
  • Build Logs (available for 30 days)

foundationdb-ci avatar Aug 12 '22 08:08 foundationdb-ci

Doxense CI Report for Windows 10

  • Commit ID: e57d3a6f9b047507a4f1994f1732a83ed305a3ee
  • Result: :x: FAILED
  • Build Logs (available for 30 days)

fdb-windows-ci avatar Aug 12 '22 09:08 fdb-windows-ci

Result of foundationdb-pr-cluster-tests on Linux CentOS 7

  • Commit ID: 312d3da04040786ae78cd478c41fc433a071b03f
  • Duration 0:07:24
  • Result: :x: FAILED
  • Error: Error while executing command: ninja -v -C build_output -j ${NPROC} all packages strip_targets. Reason: exit status 1
  • Build Logs (available for 30 days)

foundationdb-ci avatar Aug 12 '22 11:08 foundationdb-ci

Result of foundationdb-pr on Linux CentOS 7

  • Commit ID: 312d3da04040786ae78cd478c41fc433a071b03f
  • Duration 0:07:44
  • Result: :x: FAILED
  • Error: Error while executing command: ninja -v -C build_output -j ${NPROC} all packages strip_targets. Reason: exit status 1
  • Build Logs (available for 30 days)

foundationdb-ci avatar Aug 12 '22 11:08 foundationdb-ci

Doxense CI Report for Windows 10

  • Commit ID: 312d3da04040786ae78cd478c41fc433a071b03f
  • Result: :x: FAILED
  • Build Logs (available for 30 days)

fdb-windows-ci avatar Aug 12 '22 11:08 fdb-windows-ci

Doxense CI Report for Windows 10

  • Commit ID: 3cf0914ce08d3f27d38465ebb937fdb50c8d060b
  • Result: :x: FAILED
  • Build Logs (available for 30 days)

fdb-windows-ci avatar Aug 12 '22 12:08 fdb-windows-ci

Result of foundationdb-pr on Linux CentOS 7

  • Commit ID: 3cf0914ce08d3f27d38465ebb937fdb50c8d060b
  • Duration 1:11:56
  • Result: :white_check_mark: SUCCEEDED
  • Error: N/A
  • Build Logs (available for 30 days)

foundationdb-ci avatar Aug 12 '22 13:08 foundationdb-ci

Result of foundationdb-pr-cluster-tests on Linux CentOS 7

  • Commit ID: 3cf0914ce08d3f27d38465ebb937fdb50c8d060b
  • Duration 1:19:20
  • Result: :x: FAILED
  • Error: Error in UPLOAD_ARTIFACTS phase: [fdb-kubernetes-tests: [report files not found in build]]
  • Build Logs (available for 30 days)

foundationdb-ci avatar Aug 12 '22 13:08 foundationdb-ci