Severity: very low
dst/src arrive as int64_t from Elixir but are narrowed via static_cast<int> for dist::send/dist::recv (c_src/ops/collective.cpp:131 and :148) with no bounds check.
Scenario: Distributed.send(group, x, dst) with dst >= 2^31 (or negative) silently truncates/wraps to a different or invalid rank. Unrealistic for real rank IDs, but an unchecked narrowing.
Found in code review of the distributed-collectives scaffold (feature/distributed-mlx-scaffold).
Severity: very low
dst/srcarrive asint64_tfrom Elixir but are narrowed viastatic_cast<int>fordist::send/dist::recv(c_src/ops/collective.cpp:131 and :148) with no bounds check.Scenario:
Distributed.send(group, x, dst)withdst >= 2^31(or negative) silently truncates/wraps to a different or invalid rank. Unrealistic for real rank IDs, but an unchecked narrowing.Found in code review of the distributed-collectives scaffold (
feature/distributed-mlx-scaffold).