Fix incorrect range in randomSkewedUInt32()
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-branchormainif 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)
Doxense CI Report for Windows 10
- Commit ID: 742b73028cf8792a60f7e38795df2db855632f08
- Result: :x: FAILED
- Build Logs (available for 30 days)
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)
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)
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)
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)
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)
Doxense CI Report for Windows 10
- Commit ID: e57d3a6f9b047507a4f1994f1732a83ed305a3ee
- Result: :x: FAILED
- Build Logs (available for 30 days)
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)
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)
Doxense CI Report for Windows 10
- Commit ID: 312d3da04040786ae78cd478c41fc433a071b03f
- Result: :x: FAILED
- Build Logs (available for 30 days)
Doxense CI Report for Windows 10
- Commit ID: 3cf0914ce08d3f27d38465ebb937fdb50c8d060b
- Result: :x: FAILED
- Build Logs (available for 30 days)
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)
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)