[petsc-dev] Building libCEED with -fsanitize=address

Jeremy Luke Thompson Jeremy.Thompson at colorado.edu
Tue Jun 13 10:18:25 CDT 2023


It's probably easier to trace that sort of thing when building libCEED on
its own, but it looks like ASAN is complaining about `char
*source_path_with_name = "";`

Seems like an easy change I can do this morning.

On Tuesday, June 13, 2023, Matthew Knepley <knepley at gmail.com> wrote:
> For some reason, libCEED seems broken with Address Sanitizer
>
*********************************************************************************************
>            UNABLE to CONFIGURE with GIVEN OPTIONS (see configure.log for
details):
>
---------------------------------------------------------------------------------------------
>   Error running make on libceed: Could not execute
"[['/PETSc3/petsc/apple/bin/make',
>   '-j13', '-l24.0',
'prefix=/PETSc3/petsc/petsc-pylith/arch-pylith-debug', 'V=1',
>   'CC=/PETSc3/petsc/apple/bin/mpicc', 'CFLAGS= -fPIC -Wall -Wwrite-strings
>   -Wno-unknown-pragmas -fstack-protector -fno-stack-check
-Qunused-arguments
>   -fvisibility=hidden -fsanitize=address ',
'CXX=/PETSc3/petsc/apple/bin/mpicxx',
>   'CXXFLAGS= -Wall -Wwrite-strings -Wno-strict-aliasing
-Wno-unknown-pragmas
>   -fstack-protector -fno-stack-check -fvisibility=hidden
-fsanitize=address  -std=gnu++17
>   -fPIC ', '-B']]":
>
>   make: 'lib' with optional backends: /cpu/self/memcheck/serial
/cpu/self/memcheck/blocked
>   /PETSc3/petsc/apple/bin/mpicc -I./include -fPIC -Wall -Wwrite-strings
>   -Wno-unknown-pragmas -fstack-protector -fno-stack-check
-Qunused-arguments
>   -fvisibility=hidden -f
>   .... more output .....
>   mcheck/ceed-memcheck-qfunction.o
build/backends/memcheck/ceed-memcheck-qfunctioncontext.o
>   build/backends/memcheck/ceed-memcheck-serial.o
>   build/backends/memcheck/ceed-memcheck-vector.o
build/backends/ceed-backend-weak.o
>   build/gallery/ceed-gallery-weak.o
>
-lm/PETSc3/petsc/petsc-pylith/arch-pylith-debug/externalpackages/git.libceed/interface/ceed-preconditioning.c:44:9:
>   warning: initializing 'char *' with an expression of type 'const char
[1]' discards
>   qualifiers [-Wincompatible-pointer-types-discards-qualifier
>   .... more error .....
>   ceed-operator.o
>   _asan.module_ctor in ceed-preconditioning.o
>   ...
>   ld: symbol(s) not found for architecture x86_64
>   clang: error: linker command failed with exit code 1 (use -v to see
invocation)
>   make: *** [Makefile:517: lib/libceed.dylib] Error 1
>
> Does anyone else see this?
>
>   Thanks,
>      Matt
>
> --
> What most experimenters take for granted before they begin their
experiments is infinitely more interesting than any results to which their
experiments lead.
> -- Norbert Wiener
> https://www.cse.buffalo.edu/~knepley/
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20230613/a524a965/attachment.html>


More information about the petsc-dev mailing list