public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/110072] New: __gcov_dump cannot generate gcda for so files opened with dlopen when gcc version is later than 5.1.0
@ 2023-06-01  8:16 rc452860 at gmail dot com
  2023-06-01  8:47 ` [Bug gcov-profile/110072] " rc452860 at gmail dot com
  2023-06-01 13:43 ` pinskia at gcc dot gnu.org
  0 siblings, 2 replies; 3+ messages in thread
From: rc452860 at gmail dot com @ 2023-06-01  8:16 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 110072
           Summary: __gcov_dump cannot generate gcda for so files opened
                    with dlopen when gcc version is later than 5.1.0
           Product: gcc
           Version: 4.8.5
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: rc452860 at gmail dot com
  Target Milestone: ---

Created attachment 55229
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=55229&action=edit
example

When the version of gcc is lower than 5.1.0, __gcov_dump cannot generate gcda
files for the so files opened by dlopen.

See attachment for sample project.

After comparing the different versions of GCC code, I found that gcc before
5.1.0 stored counter data in gcov_list, while later versions of GCC stored it
in __gcov_master.

The two versions are defined as follows:

gcc4.8.5 in libgcc/libgcov.c
```
/* Chain of per-object gcov structures.  */
static struct gcov_info *gcov_list;
```

gcc8.5.0 in libgcc/libgcov-driver.c
```
/* Exactly one of these will be live in the process image.  */
struct gcov_master __gcov_master = 
  {GCOV_VERSION, 0};
```

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bug gcov-profile/110072] __gcov_dump cannot generate gcda for so files opened with dlopen when gcc version is later than 5.1.0
  2023-06-01  8:16 [Bug c/110072] New: __gcov_dump cannot generate gcda for so files opened with dlopen when gcc version is later than 5.1.0 rc452860 at gmail dot com
@ 2023-06-01  8:47 ` rc452860 at gmail dot com
  2023-06-01 13:43 ` pinskia at gcc dot gnu.org
  1 sibling, 0 replies; 3+ messages in thread
From: rc452860 at gmail dot com @ 2023-06-01  8:47 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #1 from 若尘 <rc452860 at gmail dot com> ---
The attachment modify from https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83879

To reproduce the issue, need to replace the gcc command in run.sh.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bug gcov-profile/110072] __gcov_dump cannot generate gcda for so files opened with dlopen when gcc version is later than 5.1.0
  2023-06-01  8:16 [Bug c/110072] New: __gcov_dump cannot generate gcda for so files opened with dlopen when gcc version is later than 5.1.0 rc452860 at gmail dot com
  2023-06-01  8:47 ` [Bug gcov-profile/110072] " rc452860 at gmail dot com
@ 2023-06-01 13:43 ` pinskia at gcc dot gnu.org
  1 sibling, 0 replies; 3+ messages in thread
From: pinskia at gcc dot gnu.org @ 2023-06-01 13:43 UTC (permalink / raw)
  To: gcc-bugs

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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|---                         |DUPLICATE

--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
GCC before 10.x is no longer being supported. That is we are not producing
another release of GCC before 10.x. So this is just a dup of bug 83879.

*** This bug has been marked as a duplicate of bug 83879 ***

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-06-01 13:43 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-06-01  8:16 [Bug c/110072] New: __gcov_dump cannot generate gcda for so files opened with dlopen when gcc version is later than 5.1.0 rc452860 at gmail dot com
2023-06-01  8:47 ` [Bug gcov-profile/110072] " rc452860 at gmail dot com
2023-06-01 13:43 ` pinskia at gcc dot gnu.org

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).