Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

[Windows][clang] 6369267 does not compile: -Werror,-Wnull-conversion in qwen3_5.cpp (pointer passed as bool return_hidden)

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

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

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

評価

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

調査の方向性

src/vllm/model_executor/models/qwen3_5.cpp の、9822-9836 行付近にある DenseForwardLayers のシグネチャと、12483 行付近にある呼び出しから開始してください。引数の位置を比較し、その呼び出しで boolean またはデバイスポインターのどちらを渡すべきか判断してから、-Wall -Wextra -Werror を使用した Windows clang ビルドで修正後の呼び出しを検証してください。

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

説明

Summary

Commit 636926736c0b6053eda99d08c1f753b29938fac0 does not compile with clang on Windows
(the tree builds with -Wall -Wextra -Werror):

src/vllm/model_executor/models/qwen3_5.cpp:12483:65: error: implicit conversion of nullptr constant to 'bool' [-Werror,-Wnull-conversion]
 12480 |       lg = DenseForwardLayers(d, s.hidden->t(), s.positions, s.attn_meta,
       |            ~~~~~~~~~~~~~~~~~~
 12481 |                               s.gdn_meta, attn_kv, gdn_state, impl_->weights,
 12482 |                               impl_->config, {}, nullptr, nullptr, aux_ids_arg,
 12483 |                               aux_out_arg, dbuf ? s.dev.get() : nullptr);
       |                                                                 ^~~~~~~
       |                                                                 false
1 error generated.
Why it fires

The call passes 15 arguments; the 15th parameter of DenseForwardLayers is
bool return_hidden (signature at src/vllm/model_executor/models/qwen3_5.cpp:9822-9836),
so the pointer expression dbuf ? s.dev.get() : nullptr is converted to bool. clang
rejects the null-constant arm under -Werror,-Wnull-conversion.

Passing s.dev.get() as return_hidden also looks unintended at the call site — the 16th
parameter, StepDevInputs* persistent_sdi, is defaulted here, which suggests a reshuffled
argument list rather than an intentional value.

Environment
  • Windows 11 (26200), native Windows build with clang/lld from TheRock 10.0, HIP gfx1151
  • commit 6369267, -O3 -DNDEBUG -g -Xclang -gcodeview, --target server
  • 9e63db5d compiles fine, so this was introduced by one of the 36 commits in between
Local workaround (to get a build)

static_cast<bool>(dbuf ? s.dev.get() : nullptr) — behaviour-preserving, but it does not
fix the likely wrong argument.

Suggested change

Pass the intended boolean (e.g. dbuf != nullptr) or the intended device argument, and make
the call site match the declared parameter list.

主要言語
C++
スター
423
フォーク
53
平均マージ
1日 7時間
マージ済み PR(30日)
380

環境構築

はじめの一歩

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

mudler/vllm.cpp のほかの issue

mudler/vllm.cpp の issue をすべて見る

似ている issue

C++ の issue をもっと見る

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

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