fix: use seed48() for complete RNG state initialization#107
Conversation
|
Warning Rate limit exceeded@nh13 has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 4 minutes and 45 seconds before requesting another review. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughReplaces Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Comment |
8266c32 to
34e4ecb
Compare
|
@coderabbitai review |
✅ Actions performedReview triggered.
|
|
@coderabbitai review |
✅ Actions performedReview triggered.
|
|
@coderabbitai review |
✅ Actions performedReview triggered.
|
There was a problem hiding this comment.
Actionable comments posted: 1
📜 Review details
Configuration used: defaults
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (5)
testdata/ex1.test.bfast.fastq.gzis excluded by!**/*.gztestdata/ex1.test.bwa.read1.fastq.gzis excluded by!**/*.gztestdata/ex1.test.bwa.read2.fastq.gzis excluded by!**/*.gztestdata/ex1.test.mutations.txt.gzis excluded by!**/*.gztestdata/ex1.test.mutations.vcf.gzis excluded by!**/*.gz
📒 Files selected for processing (1)
src/dwgsim_opt.c
34e4ecb to
72961e7
Compare
srand48() only sets 32 bits of the 48-bit internal state, leaving the upper 16 bits with potentially inconsistent values across platforms. This fix uses seed48() with explicit state matching POSIX srand48() behavior: X_i = (seedval << 16) + 0x330E This ensures consistent, reproducible random sequences across all platforms without changing the output for any given seed value. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]>
72961e7 to
df1c3d9
Compare
Summary
srand48()withseed48()to initialize all 48 bits of the RNG stateFixes #106
Test plan
make test-unit)make test-integration)🤖 Generated with Claude Code
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.