Re: [eigen] Eigen and GCC address sanitizer

[ Thread Index | Date Index | More lists.tuxfamily.org/eigen Archives ]


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 <joseph.mirabel@xxxxxxx>
Date: Tuesday, 16 February 2021 at 15:20
To: eigen@xxxxxxxxxxxxxxxxxxx <eigen@xxxxxxxxxxxxxxxxxxx>
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.



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/