node_parameters: reject non-finite values in floating-point range check#3143
Conversation
|
Pulls: #3143 |
Fix ros2#2898. __check_double_range accepted +inf, -inf, and NaN for a declared floating_point_range. Two causes: 1. The boundary fast path used __are_doubles_equal, whose ULP-tolerance arithmetic degenerates on non-finite operands (e.g. it claims +inf equals any finite boundary), so +inf and -inf slipped past. 2. The bound check (value < from) || (value > to) is false on both sides for NaN, so NaN slipped past. Fix: - Guard __are_doubles_equal: if either operand is non-finite, fall back to exact ==. - Rewrite the bound check as !(value >= from && value <= to), which rejects NaN. Adds a regression test for +inf, -inf, and NaN. Signed-off-by: Bar <bartalor@gmail.com>
Classifies every failure observed on PR ros2#3143 across the five Jenkins jobs (ci_linux, ci_linux-aarch64, ci_linux-rhel, ci_windows #27970, ci_windows #27999) plus the windows-repro GHA run. Compares against same-job builds in the same 2026-05-10..05-22 window: - rhel #8929 uncrustify failures: flake (recurred on #8965). - windows #27970: infra flake (Jenkins agent disconnect). - windows #27999 test_rosidl_buffer/rmw_fastrtps_cpp x9: environmental, not PR-caused (didn't recur on other Windows builds; our GHA repro passed all 9).
…lures A green GHA run means we failed to match the ci.ros2.org environment, not that PR ros2#3143 is safe — the failing tests fail on rolling too.
|
The windows Ci failures are unrelated you can ignore them |
|
Same for rhel this pr is good to be merged |
|
@jmachowinski thanks for checking that! |
Classifies every failure observed on PR ros2#3143 across the five Jenkins jobs (ci_linux, ci_linux-aarch64, ci_linux-rhel, ci_windows #27970, ci_windows #27999) plus the windows-repro GHA run. Compares against same-job builds in the same 2026-05-10..05-22 window: - rhel #8929 uncrustify failures: flake (recurred on #8965). - windows #27970: infra flake (Jenkins agent disconnect). - windows #27999 test_rosidl_buffer/rmw_fastrtps_cpp x9: environmental, not PR-caused (didn't recur on other Windows builds; our GHA repro passed all 9).
…lures A green GHA run means we failed to match the ci.ros2.org environment, not that PR ros2#3143 is safe — the failing tests fail on rolling too.
|
Hi, @fujitatomoya, could this be backported? |
|
@Mergifyio backport kilted jazzy |
✅ Backports have been createdDetails
Cherry-pick of fa8478f has failed: To fix up this pull request, you can check it out locally. See documentation: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally
Cherry-pick of fa8478f has failed: To fix up this pull request, you can check it out locally. See documentation: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally |
|
Was lyrical skipped intentionally? |
|
Nope, it is just too new and not in the muscle memory 😜 @Mergifyio backport lyrical |
|
@Mergifyio backport lyrical |
✅ Backports have been createdDetails
|
Description
Fixes #2898.
__check_double_rangeaccepted+inf,-inf, andNaNfor parameters declared with afloating_point_range. Fix guards__are_doubles_equalagainst non-finite operands and rewrites the bound check soNaNis rejected.Is this user-facing behavior change?
Yes.
set_parameterwith+inf,-inf, orNaNon a parameter with afloating_point_rangenow returnssuccessful=false.Did you use Generative AI?
Yes — Claude Opus 4.7.
Additional Information
Adds a regression test in
test_node.cppfor the three non-finite cases. The new scope block pushes the existingTEST_Fover cpplint's 800-line limit, so a// NOLINT(readability/fn_size)is added on its closing brace — same pattern other ROS 2 packages use for this case.