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

Improve output #3

Closed
jeroen opened this issue Jul 27, 2016 · 11 comments
Closed

Improve output #3

jeroen opened this issue Jul 27, 2016 · 11 comments

Comments

@jeroen
Copy link

jeroen commented Jul 27, 2016

We can get more verbose output by setting some env vars. Perhaps this makes a better default?

ENV UBSAN_OPTIONS print_stacktrace=1
ENV ASAN_OPTIONS malloc_context_size=10:fast_unwind_on_malloc=false

I'm still trying to figure out how BDR gets the actual line numbers in there.

@eddelbuettel
Copy link
Member

That looks useful!

What do you use these days to tickle it? My examples in sanitizers? Something else? Does that side need work too?

@jeroen
Copy link
Author

jeroen commented Jul 27, 2016

I add dockerfiles to my repo's which CRAN has complained about and then check build logs on dockerhub for ASAN/UBSAN warnings. For example for curl dockerfile with output.

@eddelbuettel
Copy link
Member

Good workflow using the hub for builds.

It would be good to expand the collection in sanitizers so if/when you have something you can distill out the package would be happy to take it ...

@eddelbuettel
Copy link
Member

eddelbuettel commented Aug 9, 2016

Did you see this README by BDR? Maybe

setenv ASAN_OPTIONS 'alloc_dealloc_mismatch=0:detect_leaks=0:detect_odr_violation=0'   
setenv ASAN_OPTIONS 'alloc_dealloc_mismatch=0:detect_leaks=0:detect_odr_violation=0'   

for clang and gcc6, respectively, which appear to be identical...

He also uses newer compilers which I may not the time to create a setup for....

@eddelbuettel
Copy link
Member

I made two small commits updating the Dockerfile.

A better bet may to also try gcc/g++ 6.* which becoming standard in Debian unstable anyway.

@eddelbuettel
Copy link
Member

I have now updated the Dockerfile to what BDR has on the README within the memtests directory. Maybe you can give that a spin.

@jeroen
Copy link
Author

jeroen commented Sep 12, 2016

Ahhh I get now why I am not seeing memory leaks anymore. BDR has disabled these in ASAN_OPTIONS. I had not noticed this before. That's unfortunate, those were very useful. He probably disabled them because it reveals too many memleaks in base R.

@eddelbuettel
Copy link
Member

Thanks for the follow-up here; much appreciated.

Was thinking the other day about this when I saw a docker/ subdir in one of your repos. You are still using this for some / many / ... of your (larger) packages?

@jeroen
Copy link
Author

jeroen commented Sep 12, 2016

Yes I use this image for UBSAN testing of C/C++ code before submitting to CRAN. We also added it to r-hub but that is still very experimental as Gabor is fixing 100 other things first.

@eddelbuettel
Copy link
Member

I actually saw that at r-hub the other day (when I was hoping to find OS X and/or Windows builders there).

I guess this issue can be closed though? Do report possibly fixes, improvements, whatnots, ... though. Oxford is not shouting at me much these days so I don't use this much ;-)

@jeroen jeroen closed this as completed Sep 12, 2016
@jeroen
Copy link
Author

jeroen commented Sep 12, 2016

Yeah maybe I'll submit another image just for mem leak testing of packages. But for now I guess I'll just set the ASAN_OPTIONS var before testing

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

2 participants