Skip to content

Commit 0442425

Browse files
jonkeanethisisnic
authored andcommitted
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]>
1 parent 265ef5e commit 0442425

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

docker-compose.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1657,10 +1657,11 @@ services:
16571657
tz: ${TZ}
16581658
r_prune_deps: ${R_PRUNE_DEPS}
16591659
shm_size: *shm-size
1660+
# These environment variables are *not* set by CRAN, so we should be careful about adding
1661+
# to them. I.E. if we have to add something here to have CI pass, it will likely fail on CRAN.
16601662
environment:
16611663
<<: *common
16621664
LIBARROW_DOWNLOAD: "false"
1663-
ARROW_MIMALLOC: "OFF"
16641665
ARROW_R_DEV: ${ARROW_R_DEV}
16651666
ARROW_SOURCE_HOME: "/arrow"
16661667
ARROW_USE_PKG_CONFIG: "false"

r/tools/nixlibs.R

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -585,6 +585,11 @@ build_libarrow <- function(src_dir, dst_dir) {
585585
)
586586
}
587587

588+
if (on_linux_dev) {
589+
# Disable mimalloc on linux devel builds, since mimalloc has spurious sanitizer failures
590+
env_var_list <- c(env_var_list, ARROW_MIMALLOC = Sys.getenv("ARROW_MIMALLOC", "OFF"))
591+
}
592+
588593
env_var_list <- with_cloud_support(env_var_list)
589594

590595
# turn_off_all_optional_features() needs to happen after
@@ -917,6 +922,7 @@ is_release <- is.na(dev_version) || dev_version < "100"
917922

918923
on_macos <- tolower(Sys.info()[["sysname"]]) == "darwin"
919924
on_windows <- tolower(Sys.info()[["sysname"]]) == "windows"
925+
on_linux_dev <- tolower(Sys.info()[["sysname"]]) == "linux" && grepl("devel", R.version.string)
920926

921927
# For local debugging, set ARROW_R_DEV=TRUE to make this script print more
922928
quietly <- !env_is("ARROW_R_DEV", "true")

0 commit comments

Comments
 (0)