[Windows][clang] 6369267 does not compile: -Werror,-Wnull-conversion in qwen3_5.cpp (pointer passed as bool return_hidden)
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 9e63db5dcompiles 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
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- 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.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của mudler/vllm.cpp
-
[Windows] full build fails in tools/bench/conv1d_scaling_probe.cpp (POSIX-only sys/resource.h)Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 88/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của mudler/vllm.cpp
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Icinga/icinga2#11058 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
component: split-view platform: windows
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
zen-browser/desktop#15616 · 1 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
-
area/ysql kind/bug priority/medium status/awaiting-triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
yugabyte/yugabyte-db#34415 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 86/100
WayfireWM/wayfire#3148 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày