[petsc-users] Petsc with Address Sanitizer
Jacob Faibussowitsch
jacob.fai at gmail.com
Tue Mar 15 10:13:40 CDT 2022
$ ./configure --COPTFLAGS=“-fsanitize=address -fsanitize=undefined -fno-sanitize-recover=all -fsanitize=float-divide-by-zero -fsanitize=float-cast-overflow -fno-sanitize=null -fno-sanitize=alignment” --CXXOPTFLAGS=“-fsanitize=address -fsanitize=undefined -fno-sanitize-recover=all -fsanitize=float-divide-by-zero -fsanitize=float-cast-overflow -fno-sanitize=null -fno-sanitize=alignment"
Should do what you want. Note that as of the latest release PETSc is not exactly -fsanitize=undefined clean. We have integrated -fsanitize=address into CI but have yet to do the same for the other checkers.
Best regards,
Jacob Faibussowitsch
(Jacob Fai - booss - oh - vitch)
> On Mar 15, 2022, at 11:09, Isaías Gallana <gallanaisaias at gmail.com> wrote:
>
> Hi everyone.
>
> I would like to compile petsc with a few of the Google Sanitizers, in particular ASAN.
> I am using petsc-3.16.4, but I guess that is not relevant.
>
> I have used for other projects
>
> -fsanitize=address -fsanitize=undefined -fno-sanitize-recover=all -fsanitize=float-divide-by-zero -fsanitize=float-cast-overflow -fno-sanitize=null -fno-sanitize=alignment
>
> as shown in https://developers.redhat.com/blog/2021/05/05/memory-error-checking-in-c-and-c-comparing-sanitizers-and-valgrind#tldr. <https://developers.redhat.com/blog/2021/05/05/memory-error-checking-in-c-and-c-comparing-sanitizers-and-valgrind#tldr.>
>
> I could not find the proper way to do that, and I do not even know if that is possible.
>
> Does anyone know about this?
> What is the proper configure line?
>
> Thanks a lot
>
>
>
>
> --
> Isaías
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20220315/74f6f20a/attachment-0001.html>
More information about the petsc-users
mailing list