This is an automated email from the ASF dual-hosted git repository.

jonkeane pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/arrow.git


The following commit(s) were added to refs/heads/main by this push:
     new c3be5fc93d GH-47211: [CI][R] Disable non-system memory allocators when 
on linux-devel (#47212)
c3be5fc93d is described below

commit c3be5fc93d3409301a92b61268129180ebb067ff
Author: Jonathan Keane <[email protected]>
AuthorDate: Mon Jul 28 17:37:08 2025 -0500

    GH-47211: [CI][R] Disable non-system memory allocators when on linux-devel 
(#47212)
    
    ### Rationale for this change
    We need to disable these at buildtime, so that they are *also* disabled on 
CRAN.
    
    Resolves #47211
    
    ### What changes are included in this PR?
    Remove the env var set in CI, set the flag when building
    
    ### Are these changes tested?
    They are tests
    
    ### Are there any user-facing changes?
    Hopefully no!
    
    * GitHub Issue: #47211
    
    Authored-by: Jonathan Keane <[email protected]>
    Signed-off-by: Jonathan Keane <[email protected]>
---
 docker-compose.yml | 3 ++-
 r/tools/nixlibs.R  | 6 ++++++
 2 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/docker-compose.yml b/docker-compose.yml
index 528e4cc8fc..cddd075ddd 100644
--- a/docker-compose.yml
+++ b/docker-compose.yml
@@ -1657,10 +1657,11 @@ services:
         tz: ${TZ}
         r_prune_deps: ${R_PRUNE_DEPS}
     shm_size: *shm-size
+    # These environment variables are *not* set by CRAN, so we should be 
careful about adding
+    # to them. I.E. if we have to add something here to have CI pass, it will 
likely fail on CRAN.
     environment:
       <<: *common
       LIBARROW_DOWNLOAD: "false"
-      ARROW_MIMALLOC: "OFF"
       ARROW_R_DEV: ${ARROW_R_DEV}
       ARROW_SOURCE_HOME: "/arrow"
       ARROW_USE_PKG_CONFIG: "false"
diff --git a/r/tools/nixlibs.R b/r/tools/nixlibs.R
index 0af50ff935..e0ca972095 100644
--- a/r/tools/nixlibs.R
+++ b/r/tools/nixlibs.R
@@ -585,6 +585,11 @@ build_libarrow <- function(src_dir, dst_dir) {
     )
   }
 
+  if (on_linux_dev) {
+    # Disable mimalloc on linux devel builds, since mimalloc has spurious 
sanitizer failures
+    env_var_list <- c(env_var_list, ARROW_MIMALLOC = 
Sys.getenv("ARROW_MIMALLOC", "OFF"))
+  }
+
   env_var_list <- with_cloud_support(env_var_list)
 
   # turn_off_all_optional_features() needs to happen after
@@ -917,6 +922,7 @@ is_release <- is.na(dev_version) || dev_version < "100"
 
 on_macos <- tolower(Sys.info()[["sysname"]]) == "darwin"
 on_windows <- tolower(Sys.info()[["sysname"]]) == "windows"
+on_linux_dev <-  tolower(Sys.info()[["sysname"]]) == "linux" && grepl("devel", 
R.version.string)
 
 # For local debugging, set ARROW_R_DEV=TRUE to make this script print more
 quietly <- !env_is("ARROW_R_DEV", "true")

Reply via email to