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

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

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

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

调研方向

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.

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

描述

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

主要语言
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 摘要。