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

Aberta
#2,472 0 comentários 0 reações 0 responsáveis Ver no GitHub

Mantenedores costumam responder em até 1 dia

Ninguém assumiu esta issue ainda.

Avaliação

Dificuldade
4/5
Tempo estimado
3-5 dias
Facilidade para iniciantes
53/100
Tipo de issue
Bug
Clareza
Claramente especificada
Status de atividade
Ativa
Stack de tecnologia
c, python
Domínio
testing, tooling

Direção de pesquisa

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.

Escrita pelo modelo de indexação a partir do texto da issue.

Descrição

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

Linguagem predominante
C
Estrelas
3
Forks
7
Merge médio
3h 28min
PRs com merge (30d)
270

Preparar o ambiente

Abrir no Codespaces

Inicia o contêiner de desenvolvimento do projeto no navegador, com a sua própria conta do GitHub.

Primeiros passos

  1. Leia a issue inteira e depois o guia de contribuição do projeto.
  2. Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
  3. Faça um fork do repositório e trabalhe em uma branch.
  4. Abra um pull request que referencie o número da issue.

Mais de InauguralSystems/EigenScript

Todas as issues de InauguralSystems/EigenScript

Issues semelhantes

Mais issues de C

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.