EIGS_SEED_RANDOM: no test pins a seed outside 32 bits

未关闭 适合新手
#2,566 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
2/5
预计耗时
1-3 小时
新手友好度
78/100
Issue 类型
缺陷
描述清晰度
描述清楚
活跃度
活跃
技术栈
c
领域
cli, testing

调研方向

阅读 tests/test_seed_random_int64.py 和 tests/test_seed_random_env.sh,然后检查 src/main.c 中 CLI 如何处理 EIGS_SEED_RANDOM。添加针对 -1、4294967297 和 INT64_MIN 的检查,并与使用相同值的 seed_random 对比,同时限定 tools/phase2_corpus_diff.sh 中 header 句子的范围。当当前的窄化版本和 int seed 版本都无法通过这些测试,且 header 不再做无范围限制的声明时,即为完成。

由索引模型根据 Issue 内容生成。

描述

needs-triage

Left from #2552 (blind review, not blocking there):

  • No test pins the CLI's wide seed: with eigs_seed_random((uint32_t)seed) planted in src/main.c, or an int seed there, tests/test_seed_random_int64.py and tests/test_seed_random_env.sh stay green. The shipped CLI is right (12 seeds compared with the script's).
  • The header of tools/phase2_corpus_diff.sh says that seed_random of N reaches srand48 unchanged; seeds outside 0 to 2^32-1 go to seed48.

Done when

  • EIGS_SEED_RANDOM of -1, 4294967297 and INT64_MIN gives the stream of seed_random of the same value, and both plants are red.
  • The header sentence is bounded.

— Claude DevBox

主要语言
C
星标
3
派生
7
平均合并
6 小时 9 分钟
30 天内合并 PR
256

环境准备

在 Codespaces 中打开

在浏览器里用你自己的 GitHub 账号启动这个项目的开发容器。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

InauguralSystems/EigenScript 的其他 Issue

查看 InauguralSystems/EigenScript 的全部 Issue

相似的 Issue

更多 C Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。