Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CRAN clang-san error from purrr during package submission pre-check #1157

Open
jayhesselberth opened this issue Jan 9, 2025 · 1 comment · Fixed by jayhesselberth/purrr#1 · May be fixed by #1159
Open

CRAN clang-san error from purrr during package submission pre-check #1157

jayhesselberth opened this issue Jan 9, 2025 · 1 comment · Fixed by jayhesselberth/purrr#1 · May be fixed by #1159

Comments

@jayhesselberth
Copy link

We are updating a package on CRAN and this error is thrown during the pre-check, from cleancall.c in purrr:

File: valr-Ex.Rout
cleancall.c:110:46: runtime error: call to function cb_progress_done through pointer to incorrect function type 'void (*)(void *)'

File: tests/testthat.Rout
cleancall.c:110:46: runtime error: call to function cb_progress_done through pointer to incorrect function type 'void (*)(void *)'

rnabioco/valr#423 (comment)

CRAN wants us to fix. We don't import purrr directly but it's an eventual dependency (haven't tracked the specific culprit though).

db <- tools::CRAN_package_db()    
deps <- tools::package_dependencies("valr", recursive=TRUE, db=db)

"purrr" %in% deps$valr
#> [1] TRUE

Created on 2025-01-09 with reprex v2.1.1

This error doesn't appear to have come up before in the purrr issues. Any ideas for a fix?

@jayhesselberth jayhesselberth changed the title CRAN clang-san error from purrr CRAN clang-san error from purrr during package submission pre-check Jan 9, 2025
@kriemo
Copy link

kriemo commented Jan 10, 2025

A suggested fix is provided on the r-pkg-devel mailing list: https://stat.ethz.ch/pipermail/r-package-devel/2025q1/011353.html .

This warning was also previously noted during another package submission: https://stat.ethz.ch/pipermail/r-package-devel/2024q4/011230.html

jayhesselberth added a commit to jayhesselberth/purrr that referenced this issue Jan 10, 2025
jayhesselberth added a commit to jayhesselberth/purrr that referenced this issue Jan 11, 2025
Fixes tidyverse#1157

I confirmed that clang-asan fails on current purrr with a similar error to what we're seeing in valr. This is in purrr-Ex.Rout from [this rhub check](https://github.com/jayhesselberth/purrr/actions/runs/12720310041/job/35461775454).

```
cleancall.c:110:46: runtime error: call to function cb_progress_done through pointer to incorrect function type 'void (*)(void *)'
/__w/purrr/purrr/check/purrr.Rcheck/00_pkg_src/purrr/src/map.c:15: note: cb_progress_done defined here
    #0 0x7fd287f0d48b in call_exits /__w/purrr/purrr/check/purrr.Rcheck/00_pkg_src/purrr/src/cleancall.c:110:46
    #1 0x7fd28ddf1131 in R_ExecWithCleanup /tmp/R-devel/src/main/context.c:913:5
    #2 0x7fd287f0cdf2 in r_with_cleanup_context /__w/purrr/purrr/check/purrr.Rcheck/00_pkg_src/purrr/src/cleancall.c:133:14
```

This simple patch proposed on the R-devel mailing list fixes that clang-asan error ([clang asan run](https://github.com/jayhesselberth/purrr/actions/runs/12718786947/job/35457848128)).
jayhesselberth added a commit to rnabioco/purrr that referenced this issue Jan 11, 2025
I confirmed that clang-asan fails on current purrr with a similar error to what we're seeing in valr. This is in purrr-Ex.Rout from [this rhub check](https://github.com/jayhesselberth/purrr/actions/runs/12720310041/job/35461775454).

```
cleancall.c:110:46: runtime error: call to function cb_progress_done through pointer to incorrect function type 'void (*)(void *)'
/__w/purrr/purrr/check/purrr.Rcheck/00_pkg_src/purrr/src/map.c:15: note: cb_progress_done defined here
    #0 0x7fd287f0d48b in call_exits /__w/purrr/purrr/check/purrr.Rcheck/00_pkg_src/purrr/src/cleancall.c:110:46
    tidyverse#1 0x7fd28ddf1131 in R_ExecWithCleanup /tmp/R-devel/src/main/context.c:913:5
    tidyverse#2 0x7fd287f0cdf2 in r_with_cleanup_context /__w/purrr/purrr/check/purrr.Rcheck/00_pkg_src/purrr/src/cleancall.c:133:14
```

This simple patch proposed on the R-devel mailing list fixes that clang-asan error ([clang asan run](https://github.com/jayhesselberth/purrr/actions/runs/12718786947/job/35457848128)).

Also updated the rhub action because it was useful to debug this issue.
@jayhesselberth jayhesselberth linked a pull request Jan 11, 2025 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants