Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

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

Đang mở Phù hợp với người mới
#3,308 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
2/5
Thời gian dự kiến
1-3 giờ
Mức phù hợp với người mới
82/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
cpp
Lĩnh vực
machine-learning

Hướng nghiên cứu

Bắt đầu trong src/vllm/model_executor/models/qwen3_5.cpp, tại chữ ký của DenseForwardLayers quanh các dòng 9822-9836 và tại lời gọi quanh dòng 12483. So sánh vị trí của các đối số và xác định xem lời gọi cần truyền một boolean hay một con trỏ thiết bị, sau đó xác minh lời gọi đã sửa bằng bản build Windows clang với -Wall -Wextra -Werror.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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.

Ngôn ngữ chính
C++
Star
423
Fork
53
Merge trung bình
1 ngày 5 giờ
Pull request đã merge (30 ngày)
376

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của mudler/vllm.cpp

Tất cả issue của mudler/vllm.cpp

Issue tương tự

Thêm issue về C++

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.