Hello Joseph, My experience is no - if you want to use Address Sanitizer, *ALL* your code must be compiled with it, otherwise you will hit false positives eventually. This is nothing specific to Eigen but will affect any library.
By coincidence I wrote a blog post about this and how I solve the problem at the weekend, you can find it here: https://spinicist.org.uk/posts/vcpkg-part2/ Good luck, Toby From: Joseph Mirabel <[email protected]> Date: Tuesday, 16 February 2021 at 15:20 To: [email protected] <[email protected]> Subject: [eigen] Eigen and GCC address sanitizer Dear Eigen developers, Is it safe to compile a library using Eigen with option `-fsanitize=address` and then to link this library to another library, also using Eigen, which hasn't been compiled with this option ? I have head-buffer-overflow errors coming from Eigen::internal::handmade_aligned_free(void*), at /usr/include/eigen3/Eigen/src/Core/util/Memory.h:98. >From the code in src/Core/util/Memory.h, the definition of many memory allocation function is modified so I would say it isn't safe but I would like a confirmation. Best, Joseph Mirabel
