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

Possible ASAN false positve, need for more tuning parameters? #598

Open
eddelbuettel opened this issue Apr 13, 2024 · 4 comments
Open

Possible ASAN false positve, need for more tuning parameters? #598

eddelbuettel opened this issue Apr 13, 2024 · 4 comments

Comments

@eddelbuettel
Copy link
Contributor

eddelbuettel commented Apr 13, 2024

As a test, I ran the clang-asan container against a package that is clean at CRAN. It didn't get very far on either examples or tests:

SUMMARY: AddressSanitizer: alloc-dealloc-mismatch (/opt/R/devel-asan/lib/R/bin/exec/R+0xc6306) \
      (BuildId: 272af7e16eb36c1b611bd4560b5c047b99d9c469) in free
==4698==HINT: if you don't care about these errors you may set ASAN_OPTIONS=alloc_dealloc_mismatch=0

Googling the message leads to e.g. this GH issue suggesting we want to set the env var. Could a new config argument for env vars be added?

@eddelbuettel eddelbuettel changed the title Possible ASAN false positve? Possible ASAN false positve and/or need for more tuning parameters? Apr 13, 2024
@eddelbuettel eddelbuettel changed the title Possible ASAN false positve and/or need for more tuning parameters? Possible ASAN false positve, need for more tuning parameters? Apr 13, 2024
@gaborcsardi
Copy link
Collaborator

Thanks, yes, definitely need to be able to pass env vars, let's keep this issue open for that.

But for this case specifically it seems like something that we always want to set on libc++ + asan containers.

@m-jahn
Copy link

m-jahn commented May 17, 2024

I have the same issue with a package of mine containing compiled code and testing with clang + ASAN/UBSAN.

@AshesITR
Copy link

AshesITR commented Jun 24, 2024

Package RcppParallel also causes an ODR false positive (this is even noted in the official memtest README).
ASAN_OPTIONS needs to be extended by detect_odr_violation=0 to fix this particular problem.

setenv ASAN_OPTIONS 'detect_leaks=0'
[RcppParallel is run adding detect_odr_violation=0]

@ShailChoksi
Copy link

Has there been any progress on this? I am running into issues with rhub ASAN/UBSAN workflows for another Rcpp package

gaborcsardi added a commit to r-hub/containers that referenced this issue Nov 12, 2024
Ignore the alloc-dealloc-mismatch reports, which seem
to be false positive. Cf. r-hub/rhub#598

IDK if they are always a false positive, though.
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

No branches or pull requests

5 participants