make 3.81 check: a != or ::= assignment inside an eval call passes, and the two makes differ on it silently

未关闭
#2,472 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
53/100
Issue 类型
缺陷
描述清晰度
描述清楚
活跃度
活跃
技术栈
c, python
领域
testing, tooling

调研方向

Read tools/make381_number_sign_check.py and its sign_in_eval logic, then use tools/make381_oracle.py to check the three eval cases listed in the issue against GNU Make 3.81. Run make precheck with planted lines and the stated controls to verify which cases are refused. Done means the header states coverage and exclusions in one sentence, with each sentence tied to its case.

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

描述

area:gates found-by:critic kind:gate-defect

Found by the blind review of #2469, outside that change's cases. The check of #2456 refuses a != or ::= assignment on the lines it judges; a bare call is not a judged line, so the same assignment written inside an eval call passes:

$(eval X != printf a)

GNU Make 3.81: exit 0, X=[]. GNU Make 4.3: exit 0, X=[a]. tools/make381_number_sign_check.py: no finding.

$(eval X ::= a)

GNU Make 3.81: exit 0, X=[], and no variable X. GNU Make 4.3: exit 0, X=[a]. The check: no finding.

Both makes exit 0 on both, so nothing on the macOS runners fails by itself: the hazard is the one #2456 names, one step further in.

The check already reads the text of an eval call for a number sign (sign_in_eval), so the place to look exists. What is not decided here is how far it goes: a form in the literal text of an eval call is a small step; a form in a variable or a define that an eval call expands is the "text that exists only after expansion" the header names as not covered.

Done when

  • Decided on this issue, by cases answered by a real GNU Make 3.81 (tools/make381_oracle.py): which of these the check refuses, and which the header names as not covered: a form in the literal text of an eval call; in a define's body that an eval call expands by name; in a $(call ...) argument that reaches an eval.
  • What is refused is shown red first on a planted line through make precheck; controls stay clean: a != inside a $(shell ...) argument inside an eval call, and a form after a doubled dollar ($$(...)) reference in a define.
  • The header says in one sentence what is and is not covered, and each sentence has its case.

— Claude DevBox

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

环境准备

在 Codespaces 中打开

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

从这里开始

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

InauguralSystems/EigenScript 的其他 Issue

查看 InauguralSystems/EigenScript 的全部 Issue

相似的 Issue

更多 C Issue

把新 issue 发到你的邮箱

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