From 1f3b53d84a0780cef35d6c515073b75693957852 Mon Sep 17 00:00:00 2001 From: Ivan K Date: Sat, 24 Jan 2026 14:26:30 +0300 Subject: [PATCH 1/2] tests/froll.R: disable mcparallel under Valgrind --- tests/froll.R | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/tests/froll.R b/tests/froll.R index faf69d28b8..8ddbef6f41 100644 --- a/tests/froll.R +++ b/tests/froll.R @@ -1,4 +1,10 @@ -Sys.setenv(OMP_THREAD_LIMIT = Sys.getenv("OMP_THREAD_LIMIT", "2")) +# Valgrind developers say that performing work after fork() without +# exec() is problematic for Valgrind. frollapply() uses +# parallel::mcparallel(), which causes Valgrind to run +# Rstd_ReadConsole() incorrectly. +Sys.setenv(OMP_THREAD_LIMIT = Sys.getenv("OMP_THREAD_LIMIT", + if (grepl("valgrind", Sys.getenv("LD_PRELOAD"))) "1" else "2" +)) require(data.table) test.data.table(script="froll.Rraw") test.data.table(script="frollBatch.Rraw", optional=TRUE) From 0a8609d542bebccb8fbcbaf72ba7a2e223a5b07e Mon Sep 17 00:00:00 2001 From: Ivan K Date: Sat, 24 Jan 2026 17:50:31 +0300 Subject: [PATCH 2/2] Be even stricter under Valgrind --- tests/froll.R | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/froll.R b/tests/froll.R index 8ddbef6f41..d4ca87f9db 100644 --- a/tests/froll.R +++ b/tests/froll.R @@ -2,9 +2,9 @@ # exec() is problematic for Valgrind. frollapply() uses # parallel::mcparallel(), which causes Valgrind to run # Rstd_ReadConsole() incorrectly. -Sys.setenv(OMP_THREAD_LIMIT = Sys.getenv("OMP_THREAD_LIMIT", - if (grepl("valgrind", Sys.getenv("LD_PRELOAD"))) "1" else "2" -)) +Sys.setenv(OMP_THREAD_LIMIT = + if (grepl("valgrind", Sys.getenv("LD_PRELOAD"))) "1" else Sys.getenv("OMP_THREAD_LIMIT", "2") +) require(data.table) test.data.table(script="froll.Rraw") test.data.table(script="frollBatch.Rraw", optional=TRUE)