This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/67497] data.c sanitizer runtime error: null pointer passed as argument 2, which is declared to never be null
- From: "zeccav at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 12 May 2016 17:20:44 +0000
- Subject: [Bug fortran/67497] data.c sanitizer runtime error: null pointer passed as argument 2, which is declared to never be null
- Auto-submitted: auto-generated
- References: <bug-67497-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67497
--- Comment #5 from Vittorio Zecca <zeccav at gmail dot com> ---
Still in trunk:
../../gcc7/gcc/fortran/data.c:191:32: runtime error: null pointer passed as
argument 2, which is declared to never be null
here:
memcpy (&dest[start], rvalue->value.character.string, len * sizeof
(gfc_char_t));
Probably len==0 and preponing an if(len) should do the trick