[Engine] 0.2.24: `strata --help` segfaults — unescaped `%` in the `--deterministic` help text

オープン 初心者向け
#7,754 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

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

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

評価

難易度
1/5
見積もり時間
1時間未満
初心者へのやさしさ
86/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
cpp
領域
cli

調査の方向性

engine/src/program/generate.cpp の 1409 行付近にあるヘルプの fprintf 書式文字列を読み、3911 行付近にある対応する文と比較してください。ソースビルドから strata --help を実行してクラッシュを再現してください。ヘルプがセグフォルトせず最後まで出力されれば完了です。

索引モデルが issue の本文から書いたものです。

説明

What happens

A source build of v0.2.24 (tag 70ac2f246, Linux, CUDA 13, -DCMAKE_CUDA_ARCHITECTURES=120 -DSTRATA_OWN_CPU_QUANT=ON) prints the help
up to the --deterministic entry and then crashes:

$ ./build/strata --help
...
  --deterministic      (or STRATA_DETERMINISTIC=1; off by default) the same prompt and settings give the
                       same answer on every run: every missed expert is computed on the GPU (--pcie-frac 1
                       when you give none) and the prompt does not use CPU exper
Segmentation fault

gdb: SIGSEGV in libc, called from fprintf in main.

Cause

engine/src/program/generate.cpp:1409 (inside the help fprintf format string):

"                       (STRATA_PREFILL_CPU_SHARE=0). Decode about 3% slower with the model mostly cached\n"

% s is a valid conversion (space flag + %s), so fprintf reads a string argument that was never passed.
The same sentence at line 3911 is already written 3%%. Still present on main as of 2026-12-02 (one commit past the tag).

Fix: 3% → 3%% on line 1409.

Impact: anything that runs strata --help as a sanity check of a fresh build fails, e.g. a third-party
updater that refuses to install a binary whose --help crashes. Serving itself is unaffected.

主要言語
C++
スター
11.6k
フォーク
1k
平均マージ
6日 2時間
マージ済み PR(30日)
21

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

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

Niko1221/Strata のほかの issue

Niko1221/Strata の issue をすべて見る

似ている issue

C++ の issue をもっと見る

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

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