RFR: 8285279: ArgumentsTest.set_numeric_flag_double_vm fails on some locales (again)
David Holmes
dholmes at openjdk.java.net
Mon Apr 25 23:06:51 UTC 2022
On Mon, 25 Apr 2022 19:04:04 GMT, Ioi Lam <iklam at openjdk.org> wrote:
> Please review this trivial fix for ArgumentsTest.set_numeric_flag_double_vm. If an input string is only partially accepted by `strtod()` under the current locale , `end` will point to a non-empty character. In this case, the test should treat the input as invalid.
>
> Thanks to @tstuefe for providing the test scenario.
Changes requested by dholmes (Reviewer).
test/hotspot/gtest/runtime/test_arguments.cpp line 599:
> 597: errno = 0;
> 598: double expected = strtod(str, &end);
> 599: if (errno == 0 && end != NULL && *end == '\0') {
If end is not-empty shouldn't there be an `ASSERT_FALSE(ArgumentsTest::parse_argument(flag->name(), str)` ?
-------------
PR: https://git.openjdk.java.net/jdk/pull/8386
More information about the hotspot-runtime-dev
mailing list