Skip to content

Commit

Permalink
Add cran comments file
Browse files Browse the repository at this point in the history
  • Loading branch information
wch committed Jun 1, 2020
1 parent e68cadb commit 1be7b56
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
1 change: 1 addition & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@
^src/README.md$
^appveyor\.yml$
^src/Makevars$
^cran-comments\.md$
20 changes: 20 additions & 0 deletions cran-comments.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
The following messages occur with UBSAN. We believe that it is a false positive, due to a bug (or perhaps limitation) in UBSAN. Here's what we found from looking at it in the past:

```
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior /data/gannet/ripley/R/packages/tests-clang-SAN/later.Rcheck/later/include/later.h:96:3 in
/data/gannet/ripley/R/packages/tests-clang-SAN/later.Rcheck/later/include/later.h:96:3: runtime error: call to function execLaterNative through pointer to incorrect function type 'void (*)(void (*)(void *), void *, double)'
later.Rcheck/tests/testthat.Rout:/data/gannet/ripley/R/packages/incoming/later.Rcheck/later/include/later.h:72:3:
runtime error: call to function execLaterNative2 through pointer to
incorrect function type 'void (*)(void (*)(void *), void *, double, int)'
```

> The problem has to do with crossing dynamically linked libraries. It appears that when you have a pointer to a function in .so A, and pass it to an .so B to be invoked, clang-UBSAN emits this error. It's as if the function types can't match up if they're not from the same library.
> In our case, we're using R_GetCCallable to pass a callback to later.so. If the callback function lives in later.so, there's no error; but a callback function from a different .so does trigger the error.
For more information:
https://github.com/r-lib/later/pull/46#issuecomment-370973284

Here's the issue filed on the sanitizer:
https://github.com/google/sanitizers/issues/911

0 comments on commit 1be7b56

Please sign in to comment.