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

            Bug ID: 92817
           Summary: the prototype of the built-in __gcov_exit function is
                    wrong
           Product: gcc
           Version: 7.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: gcov-profile
          Assignee: unassigned at gcc dot gnu.org
          Reporter: pageexec at gmail dot com
                CC: marxin at gcc dot gnu.org
  Target Milestone: ---

git commit db46bcd377f4b4a26b9807a7cb3565a161178660 (since gcc 7) introduced
the callout to "void __gcov_exit(void)" however its construction looks like
this:

build_gcov_exit_decl (void)
{
  tree init_fn = build_function_type_list (void_type_node, void_type_node,
                                          NULL);

instead it should be this:

build_gcov_exit_decl (void)
{
  tree init_fn = build_function_type_list (void_type_node, NULL);

as it is, the builtin-in prototype does not match what one would define in
source code and this trips up type based control-flow integrity checks.

Reply via email to