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

Fix CRAN ASAN error #1159

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Conversation

jayhesselberth
Copy link

Fixes #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.

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).

Also updated the rhub action because it was useful to debug this issue.

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 mentioned this pull request Jan 11, 2025
19 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

CRAN clang-san error from purrr during package submission pre-check
1 participant