[Bug gcov-profile/80413] sanitizer detects undefined behaviour in gcov-io.c using -ftest-coverage

marxin at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Thu Apr 13 11:52:00 GMT 2017


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80413

--- Comment #3 from Martin Liška <marxin at gcc dot gnu.org> ---
Author: marxin
Date: Thu Apr 13 11:51:28 2017
New Revision: 246903

URL: https://gcc.gnu.org/viewcvs?rev=246903&root=gcc&view=rev
Log:
Do not call memcpy with a NULL argument (PR gcov-profile/80413).

2017-04-13  Martin Liska  <mliska@suse.cz>

        PR gcov-profile/80413
        * gcov-io.c (gcov_write_string): Copy to buffer just when
        allocated size is greater than zero.

Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/gcov-io.c


More information about the Gcc-bugs mailing list