Skip to content

Commit bac01e7

Browse files
Merge branch 'master' into memcpy-ro
2 parents fe1f74a + a08c1bc commit bac01e7

File tree

3 files changed

+11
-6
lines changed

3 files changed

+11
-6
lines changed

.github/workflows/R-CMD-check.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ jobs:
2727
# GHA does run these jobs concurrently but even so reducing the load seems like a good idea.
2828
- {os: windows-latest, r: 'devel'}
2929
# - {os: macOS-latest, r: 'release'} # test-coverage.yaml uses macOS
30-
- {os: ubuntu-20.04, r: 'release', rspm: "https://packagemanager.rstudio.com/cran/__linux__/focal/latest"}
31-
# - {os: ubuntu-20.04, r: 'devel', rspm: "https://packagemanager.rstudio.com/cran/__linux__/focal/latest", http-user-agent: "R/4.1.0 (ubuntu-20.04) R (4.1.0 x86_64-pc-linux-gnu x86_64 linux-gnu) on GitHub Actions" }
30+
- {os: ubuntu-24.04, r: 'release', rspm: "https://packagemanager.rstudio.com/cran/__linux__/focal/latest"}
31+
# - {os: ubuntu-24.04, r: 'devel', rspm: "https://packagemanager.rstudio.com/cran/__linux__/focal/latest", http-user-agent: "R/4.1.0 (ubuntu-24.04) R (4.1.0 x86_64-pc-linux-gnu x86_64 linux-gnu) on GitHub Actions" }
3232
# GLCI covers R-devel; no need to delay contributors in dev due to changes in R-devel in recent days
3333

3434
env:
@@ -64,7 +64,7 @@ jobs:
6464
while read -r cmd
6565
do
6666
eval sudo $cmd
67-
done < <(Rscript -e 'writeLines(remotes::system_requirements("ubuntu", "20.04"))')
67+
done < <(Rscript -e 'writeLines(remotes::system_requirements("ubuntu", "24.04"))')
6868
6969
- name: Install dependencies
7070
run: |

_pkgdown.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ url: https://rdatatable.gitlab.io/data.table
22

33
template:
44
bootstrap: 5
5+
light-switch: true
56

67
development:
78
version_tooltip: "Development version"
@@ -18,7 +19,7 @@ home:
1819
navbar:
1920
structure:
2021
left: [home, introduction, articles, news, benchmarks, presentations, communityarticles, reference]
21-
right: [github]
22+
right: [search, github, lightswitch]
2223
components:
2324
home:
2425
icon: fas fa-home fa-lg

src/forder.c

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -362,8 +362,10 @@ static void range_str(const SEXP *x, int n, uint64_t *out_min, uint64_t *out_max
362362
}
363363
// now use the 1-1 mapping from ustr to ustr2 to get the ordering back into original ustr, being careful to reset tl to 0
364364
int *tl = (int *)malloc(ustr_n * sizeof(int));
365-
if (!tl)
365+
if (!tl) {
366+
free(ustr3); // # nocov
366367
STOP(_("Failed to alloc tl when converting strings to UTF8")); // # nocov
368+
}
367369
const SEXP *tt = STRING_PTR_RO(ustr2);
368370
for (int i=0; i<ustr_n; i++) tl[i] = TRUELENGTH(tt[i]); // fetches the o in ustr3 into tl which is ordered by ustr
369371
for (int i=0; i<ustr_n; i++) SET_TRUELENGTH(ustr3[i], 0); // reset to 0 tl of the UTF8 (and possibly non-UTF in ustr too)
@@ -664,8 +666,10 @@ SEXP forder(SEXP DT, SEXP by, SEXP retGrpArg, SEXP retStatsArg, SEXP sortGroupsA
664666
for (int b=0; b<nbyte; b++) {
665667
if (key[nradix+b]==NULL) {
666668
uint8_t *tt = calloc(nrow, sizeof(uint8_t)); // 0 initialize so that NA's can just skip (NA is always the 0 offset)
667-
if (!tt)
669+
if (!tt) {
670+
free(key); // # nocov
668671
STOP(_("Unable to allocate %"PRIu64" bytes of working memory"), (uint64_t)nrow*sizeof(uint8_t)); // # nocov
672+
}
669673
key[nradix+b] = tt;
670674
}
671675
}

0 commit comments

Comments
 (0)