From 4751ad377b56947c1330fa2746b252f39fb7173a Mon Sep 17 00:00:00 2001 From: "riseproject-dev[bot]" <330740410+riseproject-dev[bot]@users.noreply.github.com> Date: Thu, 22 Oct 2026 12:11:47 +0000 Subject: [PATCH 1/2] resdata: Add versions 6.3.4, 6.3.5 Signed-off-by: riseproject-dev[bot] <330740410+riseproject-dev[bot]@users.noreply.github.com> --- docs/packages/resdata.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/packages/resdata.yaml b/docs/packages/resdata.yaml index b30076825367..9df727260f6d 100644 --- a/docs/packages/resdata.yaml +++ b/docs/packages/resdata.yaml @@ -16,3 +16,5 @@ versions: gpl-sources: filename: gpl-sources.tar description: elfutils +- version: 6.3.4 +- version: 6.3.5 From 7f41f13a8a12cc62f13abf711bd00c5eb177d627 Mon Sep 17 00:00:00 2001 From: Ludovic Henry Date: Fri, 23 Oct 2026 12:04:06 +0800 Subject: [PATCH 2/2] resdata: carry the 6.3.3 patches to 6.3.4 and 6.3.5 --- ...-loops-at-EOF-where-char-is-unsigned.patch | 72 +++++++++++++++++++ ...rmance_with_many_keys-timeout-for-sl.patch | 39 ++++++++++ ...-loops-at-EOF-where-char-is-unsigned.patch | 72 +++++++++++++++++++ ...rmance_with_many_keys-timeout-for-sl.patch | 39 ++++++++++ 4 files changed, 222 insertions(+) create mode 100644 patches/resdata/6.3.4/0001-Fix-infinite-loops-at-EOF-where-char-is-unsigned.patch create mode 100644 patches/resdata/6.3.4/0002-Raise-test_performance_with_many_keys-timeout-for-sl.patch create mode 100644 patches/resdata/6.3.5/0001-Fix-infinite-loops-at-EOF-where-char-is-unsigned.patch create mode 100644 patches/resdata/6.3.5/0002-Raise-test_performance_with_many_keys-timeout-for-sl.patch diff --git a/patches/resdata/6.3.4/0001-Fix-infinite-loops-at-EOF-where-char-is-unsigned.patch b/patches/resdata/6.3.4/0001-Fix-infinite-loops-at-EOF-where-char-is-unsigned.patch new file mode 100644 index 000000000000..d460f9f19b53 --- /dev/null +++ b/patches/resdata/6.3.4/0001-Fix-infinite-loops-at-EOF-where-char-is-unsigned.patch @@ -0,0 +1,72 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Ludovic Henry +Date: Sat, 17 Oct 2026 00:00:00 +0000 +Subject: [PATCH] Fix infinite loops at EOF where char is unsigned + +Upstream-Status: Backport [https://github.com/equinor/resdata/commit/ce341a3666855c57839466d9daa876252b54c8c0] + +fgetc() returns EOF (-1) as an int. Three loops store it in a plain +char and then test c == EOF; where char is unsigned (riscv64, aarch64) +c becomes 255, the test is always false (GCC: "comparison is always +false due to limited range of data type"), and the loop spins forever +once fgetc() keeps returning EOF: + +- rd_kw_qskip(): any formatted file without a quote character, e.g. + tests/rd_tests/test_rd_file.py::test_broken_file, which hangs the + test suite at that test on riscv64; +- util_fskip_lines(): fixed upstream by the commit above; +- fscanf_grdecl_data(): a trailing "--" comment without a newline. + +Upstream fixed the first as part of the rd::KW rewrite (d9eacc14e, +skip_space_until_quote()) and removed the third file in c05264026; +all three fixes are in 7.0.0b3 and in none of the 6.3.x releases. + +Signed-off-by: Ludovic Henry +--- + lib/resdata/rd_kw.cpp | 2 +- + lib/resdata/rd_kw_grdecl.cpp | 2 +- + lib/util/util.cpp | 2 +- + 3 files changed, 3 insertions(+), 3 deletions(-) + +diff --git a/lib/resdata/rd_kw.cpp b/lib/resdata/rd_kw.cpp +index 17e08f4e7..f3c2475d1 100644 +--- a/lib/resdata/rd_kw.cpp ++++ b/lib/resdata/rd_kw.cpp +@@ -1043,7 +1043,7 @@ static bool rd_kw_qskip(FILE *stream) { + const char newline = '\n'; + const char tab = '\t'; + bool OK = true; +- char c; ++ int c; + bool cont = true; + while (cont) { + c = fgetc(stream); +diff --git a/lib/resdata/rd_kw_grdecl.cpp b/lib/resdata/rd_kw_grdecl.cpp +index 55785de1f..34262a88b 100644 +--- a/lib/resdata/rd_kw_grdecl.cpp ++++ b/lib/resdata/rd_kw_grdecl.cpp +@@ -232,7 +232,7 @@ fscanf_grdecl_data(const char *header, bool strict, int &kw_size, + if (fscanf(stream, "%32s", buffer.get()) == 1) { + if (strcmp(buffer.get(), RD_COMMENT_STRING) == 0) { + // We have read a comment marker - just read up to the end of line. +- char c; ++ int c; + while (true) { + c = fgetc(stream); + if (c == newline) +diff --git a/lib/util/util.cpp b/lib/util/util.cpp +index 4014b594b..ad2485779 100644 +--- a/lib/util/util.cpp ++++ b/lib/util/util.cpp +@@ -807,7 +807,7 @@ void util_fskip_lines(FILE *stream, int lines) { + int line_nr = 0; + do { + bool at_eof = false; +- char c; ++ int c; + do { + c = fgetc(stream); + if (c == EOF) +-- +2.47.3 + diff --git a/patches/resdata/6.3.4/0002-Raise-test_performance_with_many_keys-timeout-for-sl.patch b/patches/resdata/6.3.4/0002-Raise-test_performance_with_many_keys-timeout-for-sl.patch new file mode 100644 index 000000000000..4a2ab693903f --- /dev/null +++ b/patches/resdata/6.3.4/0002-Raise-test_performance_with_many_keys-timeout-for-sl.patch @@ -0,0 +1,39 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Ludovic Henry +Date: Sat, 17 Oct 2026 00:00:00 +0000 +Subject: [PATCH] Raise test_performance_with_many_keys timeout for slower + hosts + +Upstream-Status: Inappropriate [the 10s ceiling is sized for upstream's x86 CI; the riscv64 runners finish the same bounded work in about 12s] + +The test builds a 5000-key summary case and lets pytest-benchmark run +summary.x over it. A call that takes longer than max_time (1s) makes +pytest-benchmark do exactly 2 calibration calls plus min_rounds (5), +so the work is a fixed 7 calls. On x86_64 one call takes about 0.1s +and the whole test about 1.2s, well inside its 10s marker. On the +riscv64 runners one call takes about 1.4s: the timeout fired after +the sixth call had printed its table, during the seventh and last. + +The profile is linear in the number of keys (one SummaryKeyType +lookup per key); nothing loops. Raise the ceiling to 60s so it still +catches a real regression (a quadratic key lookup blows far past it) +without failing on a slower host. + +Signed-off-by: Ludovic Henry +--- + tests/test_view_summary.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/tests/test_view_summary.py b/tests/test_view_summary.py +index 91ae42c..dca1053 100644 +--- a/tests/test_view_summary.py ++++ b/tests/test_view_summary.py +@@ -855,7 +855,7 @@ def test_that_restart_and_base_times_are_concated(capsys): + + + @pytest.mark.usefixtures("use_tmpdir") +-@pytest.mark.timeout(10) ++@pytest.mark.timeout(60) + def test_performance_with_many_keys(monkeypatch, benchmark): + subdir = Path("subdir") + subdir.mkdir() diff --git a/patches/resdata/6.3.5/0001-Fix-infinite-loops-at-EOF-where-char-is-unsigned.patch b/patches/resdata/6.3.5/0001-Fix-infinite-loops-at-EOF-where-char-is-unsigned.patch new file mode 100644 index 000000000000..d460f9f19b53 --- /dev/null +++ b/patches/resdata/6.3.5/0001-Fix-infinite-loops-at-EOF-where-char-is-unsigned.patch @@ -0,0 +1,72 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Ludovic Henry +Date: Sat, 17 Oct 2026 00:00:00 +0000 +Subject: [PATCH] Fix infinite loops at EOF where char is unsigned + +Upstream-Status: Backport [https://github.com/equinor/resdata/commit/ce341a3666855c57839466d9daa876252b54c8c0] + +fgetc() returns EOF (-1) as an int. Three loops store it in a plain +char and then test c == EOF; where char is unsigned (riscv64, aarch64) +c becomes 255, the test is always false (GCC: "comparison is always +false due to limited range of data type"), and the loop spins forever +once fgetc() keeps returning EOF: + +- rd_kw_qskip(): any formatted file without a quote character, e.g. + tests/rd_tests/test_rd_file.py::test_broken_file, which hangs the + test suite at that test on riscv64; +- util_fskip_lines(): fixed upstream by the commit above; +- fscanf_grdecl_data(): a trailing "--" comment without a newline. + +Upstream fixed the first as part of the rd::KW rewrite (d9eacc14e, +skip_space_until_quote()) and removed the third file in c05264026; +all three fixes are in 7.0.0b3 and in none of the 6.3.x releases. + +Signed-off-by: Ludovic Henry +--- + lib/resdata/rd_kw.cpp | 2 +- + lib/resdata/rd_kw_grdecl.cpp | 2 +- + lib/util/util.cpp | 2 +- + 3 files changed, 3 insertions(+), 3 deletions(-) + +diff --git a/lib/resdata/rd_kw.cpp b/lib/resdata/rd_kw.cpp +index 17e08f4e7..f3c2475d1 100644 +--- a/lib/resdata/rd_kw.cpp ++++ b/lib/resdata/rd_kw.cpp +@@ -1043,7 +1043,7 @@ static bool rd_kw_qskip(FILE *stream) { + const char newline = '\n'; + const char tab = '\t'; + bool OK = true; +- char c; ++ int c; + bool cont = true; + while (cont) { + c = fgetc(stream); +diff --git a/lib/resdata/rd_kw_grdecl.cpp b/lib/resdata/rd_kw_grdecl.cpp +index 55785de1f..34262a88b 100644 +--- a/lib/resdata/rd_kw_grdecl.cpp ++++ b/lib/resdata/rd_kw_grdecl.cpp +@@ -232,7 +232,7 @@ fscanf_grdecl_data(const char *header, bool strict, int &kw_size, + if (fscanf(stream, "%32s", buffer.get()) == 1) { + if (strcmp(buffer.get(), RD_COMMENT_STRING) == 0) { + // We have read a comment marker - just read up to the end of line. +- char c; ++ int c; + while (true) { + c = fgetc(stream); + if (c == newline) +diff --git a/lib/util/util.cpp b/lib/util/util.cpp +index 4014b594b..ad2485779 100644 +--- a/lib/util/util.cpp ++++ b/lib/util/util.cpp +@@ -807,7 +807,7 @@ void util_fskip_lines(FILE *stream, int lines) { + int line_nr = 0; + do { + bool at_eof = false; +- char c; ++ int c; + do { + c = fgetc(stream); + if (c == EOF) +-- +2.47.3 + diff --git a/patches/resdata/6.3.5/0002-Raise-test_performance_with_many_keys-timeout-for-sl.patch b/patches/resdata/6.3.5/0002-Raise-test_performance_with_many_keys-timeout-for-sl.patch new file mode 100644 index 000000000000..4a2ab693903f --- /dev/null +++ b/patches/resdata/6.3.5/0002-Raise-test_performance_with_many_keys-timeout-for-sl.patch @@ -0,0 +1,39 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Ludovic Henry +Date: Sat, 17 Oct 2026 00:00:00 +0000 +Subject: [PATCH] Raise test_performance_with_many_keys timeout for slower + hosts + +Upstream-Status: Inappropriate [the 10s ceiling is sized for upstream's x86 CI; the riscv64 runners finish the same bounded work in about 12s] + +The test builds a 5000-key summary case and lets pytest-benchmark run +summary.x over it. A call that takes longer than max_time (1s) makes +pytest-benchmark do exactly 2 calibration calls plus min_rounds (5), +so the work is a fixed 7 calls. On x86_64 one call takes about 0.1s +and the whole test about 1.2s, well inside its 10s marker. On the +riscv64 runners one call takes about 1.4s: the timeout fired after +the sixth call had printed its table, during the seventh and last. + +The profile is linear in the number of keys (one SummaryKeyType +lookup per key); nothing loops. Raise the ceiling to 60s so it still +catches a real regression (a quadratic key lookup blows far past it) +without failing on a slower host. + +Signed-off-by: Ludovic Henry +--- + tests/test_view_summary.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/tests/test_view_summary.py b/tests/test_view_summary.py +index 91ae42c..dca1053 100644 +--- a/tests/test_view_summary.py ++++ b/tests/test_view_summary.py +@@ -855,7 +855,7 @@ def test_that_restart_and_base_times_are_concated(capsys): + + + @pytest.mark.usefixtures("use_tmpdir") +-@pytest.mark.timeout(10) ++@pytest.mark.timeout(60) + def test_performance_with_many_keys(monkeypatch, benchmark): + subdir = Path("subdir") + subdir.mkdir()