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

オープン
#2,475 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
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分
マージ済み PR(30日)
270

環境構築

Codespaces で開く

このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

InauguralSystems/EigenScript のほかの issue

InauguralSystems/EigenScript の issue をすべて見る

似ている issue

C の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。