GALAHAD icon indicating copy to clipboard operation
GALAHAD copied to clipboard

see if sanitizers work across the board

Open dpo opened this issue 2 years ago • 1 comments

Sanitizers are tools that can help diagnose memory, addressing, and other types of errors. See https://github.com/google/sanitizers.

dpo avatar Apr 01 '23 00:04 dpo

@nimgould In this pull request, I build GALAHAD with sanitizers enabled. They are alternatives to Valgrind to diagnose various types of issues. We see issues on both Linux and macOS. They are not very verbose, but perhaps you will see more output if you try locally. The only difference is that you set up the build dir with the command

meson setup -Db_sanitize=address,undefined builddir

then you run the unit tests normally, all at once or one at a time.

On my ARM64 Mac, one of those sanitizers suggested a possible cause for the gltrt failure in single precision. After investigating, I realized that GLTR_ttrs was called with n = 0. That is because dim_sub = 0 earlier, but I haven't yet determined the cause of that. I suspect integer size mismatches (especially when we call BLAS/LAPACK), but it seems there may also be buffer overruns/leaks/etc.

dpo avatar Apr 01 '23 19:04 dpo

Thanks @dpo! We added it on master.

amontoison avatar Jun 13 '24 16:06 amontoison