This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libfortran/80365] undefined memcpy while writing zero length array on unformatted stream in unix.c
- From: "dominiq at lps dot ens.fr" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sun, 09 Jul 2017 15:15:25 +0000
- Subject: [Bug libfortran/80365] undefined memcpy while writing zero length array on unformatted stream in unix.c
- Auto-submitted: auto-generated
- References: <bug-80365-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80365
--- Comment #3 from Dominique d'Humieres <dominiq at lps dot ens.fr> ---
> How do I actually obtain this error?
I see it with a build configured with
Configured with: ../work/configure --prefix=/opt/gcc/gcc8g
--enable-languages=c,c++,fortran --with-gmp=/opt/mp-new --with-system-zlib
--with-isl=/opt/mp-new --disable-bootstrap --disable-multilib
--disable-libstdcxx CFLAGS='-L/opt/gcc/gcc7a/lib -lasan -lubsan
-fsanitize=address,undefined,leak -Og -g -fno-omit-frame-pointer'
CXXFLAGS='-fsanitize=address,undefined,leak -Og -g -fno-omit-frame-pointer'
LDFLAGS='-L/opt/gcc/gcc7a/lib -lasan -lubsan -ldl -lpthread'
../../../work/libgfortran/io/unix.c:597:7: runtime error: null pointer passed
as argument 2, which is declared to never be null
at run time.