public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "njuwy at smail dot nju.edu.cn" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug gcov-profile/99442] New: [GCOV] No coverage with "Segmentation fault (core dumped)"
Date: Sun, 07 Mar 2021 08:30:46 +0000	[thread overview]
Message-ID: <bug-99442-4@http.gcc.gnu.org/bugzilla/> (raw)

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

            Bug ID: 99442
           Summary: [GCOV] No coverage with "Segmentation fault (core
                    dumped)"
           Product: gcc
           Version: 10.2.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: gcov-profile
          Assignee: unassigned at gcc dot gnu.org
          Reporter: njuwy at smail dot nju.edu.cn
                CC: marxin at gcc dot gnu.org
  Target Milestone: ---

$ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/local/libexec/gcc/x86_64-pc-linux-gnu/10.2.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: ../configure -enable-checking=release -enable-languages=c,c++
-disable-multilib
Thread model: posix
Supported LTO compression algorithms: zlib
gcc version 10.2.0 (GCC) 

$ cat test.c
#include <stdio.h>
char fixed_regs[0x00080000];

int main() { 
printf("PASSED\n");
return fixed_regs[0x000ff000]; 
}

$ gcc -O0 --coverage test.c;./a.out;gcov test;cat test.c.gcov
PASSED
Segmentation fault (core dumped)
test.gcda:cannot open data file, assuming not executed
File 'test.c'
Lines executed:0.00% of 3
Creating 'test.c.gcov'

        -:    0:Source:test.c
        -:    0:Graph:test.gcno
        -:    0:Data:-
        -:    0:Runs:0
        -:    1:#include <stdio.h>
        -:    2:char fixed_regs[0x00080000];
        -:    3:
    #####:    4:int main() { 
    #####:    5:printf("PASSED\n");
    #####:    6:return fixed_regs[0x000ff000]; 
        -:    7:}


Obviously, main function has been executed. However, no coverage information
generated.

             reply	other threads:[~2021-03-07  8:30 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-07  8:30 njuwy at smail dot nju.edu.cn [this message]
2021-03-07  9:11 ` [Bug gcov-profile/99442] " pinskia at gcc dot gnu.org
2021-03-08  9:08 ` marxin at gcc dot gnu.org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-99442-4@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).