An error raised by a builtin in a compiled callee loses its source excerpt and caret

Aberta
#2,475 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
57/100
Tipo de issue
Bug
Clareza
Claramente especificada
Status de atividade
Ativa
Stack de tecnologia
c
Domínio
compilers

Direção de pesquisa

Start by running the supplied program with EIGS_JIT_OFF=1, with no tier variable, with EIGS_JIT_OSR_THRESHOLD=1, and in the trace tier. Then trace how the compiled callee reports builtin errors and how the diagnostics suite checks source excerpts; the issue does not name the relevant files or tests. Add a suite row that checks the excerpt and caret in all four tiers, keeping the kind, message, and line identical.

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

Descrição

area:jit kind:bug

After a function has been called often enough to be compiled, an error raised by a builtin it calls loses its source excerpt and caret. The first line (kind, message, line number) is right in every tier; the excerpt and the caret under the faulting call are printed only when the callee still runs in the interpreter.

Found while building #2444's table; it is older than that change (reproduced on phase2-numbers at f9f3e49b with a non-number argument, so nothing of #2444 is needed).

Shows it

With EIGS_STRICT=1:

define f(a) as:
    return abs of a
for warm in range of 80:
    f of 0.5
f of "bad"

With EIGS_JIT_OFF=1 the error has the source line of return abs of a and a caret under the call. With no tier variable, and with EIGS_JIT_OSR_THRESHOLD=1, both are missing after the callee is warm.

Done when

  • The program above prints the faulting callee's source line and caret with the JIT off, by default, with on-stack replacement forced and in the trace tier.
  • Kind, message and line stay identical in all four.
  • A row of the suite holds it (the diagnostics rows compare the excerpt today only for a cold call).

— 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.