public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug gcov-profile/114720] New: gcc.misc-tests/gcov-22.c loops
@ 2024-04-15  8:50 ro at gcc dot gnu.org
  2024-04-15 13:34 ` [Bug gcov-profile/114720] " cvs-commit at gcc dot gnu.org
  2024-04-15 15:54 ` [Bug testsuite/114720] " pinskia at gcc dot gnu.org
  0 siblings, 2 replies; 3+ messages in thread
From: ro at gcc dot gnu.org @ 2024-04-15  8:50 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 114720
           Summary: gcc.misc-tests/gcov-22.c loops
           Product: gcc
           Version: 14.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: gcov-profile
          Assignee: unassigned at gcc dot gnu.org
          Reporter: ro at gcc dot gnu.org
  Target Milestone: ---
            Target: sparc*-sun-solaris2.11, sparc64-unknown-linux-gnu

The new gcc.misc-tests/gcov-22.c test loops on Solaris/SPARC (32 and 64-bit)
and
Linux/sparc64:

WARNING: gcc.misc-tests/gcov-22.c execution test program timed out.
+FAIL: gcc.misc-tests/gcov-22.c execution test
+FAIL: gcc.misc-tests/gcov-22.c gcov: 0 failures in line counts, 0 in branch
percentages, 32 in condition/decision, 0 in return percentages, 0 in
intermediate format
[...]

truss -u reveals the test loops in longjmp like this:

/1@1:   -> libc:longjmp(0x25450, 0x1, 0xffbfe9e8, 0x12b04)
/1@1:   <- libc:longjmp() = 1
/1@1:   -> libc:longjmp(0x25450, 0x1, 0xffbfe9e8, 0x12b04)
/1@1:   <- libc:longjmp() = 1
[...]

I'm astonished the test works anywere, actually.  AFAICS, the issue is this:

  setdest
  -> setjmp returns 0
     setdest returns 2
  -> jump
  -> longjmp make setdest return 1
  -> jump
  -> longjmp ...

continuing ad infinitum.

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

* [Bug gcov-profile/114720] gcc.misc-tests/gcov-22.c loops
  2024-04-15  8:50 [Bug gcov-profile/114720] New: gcc.misc-tests/gcov-22.c loops ro at gcc dot gnu.org
@ 2024-04-15 13:34 ` cvs-commit at gcc dot gnu.org
  2024-04-15 15:54 ` [Bug testsuite/114720] " pinskia at gcc dot gnu.org
  1 sibling, 0 replies; 3+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2024-04-15 13:34 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #1 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by J?rgen Kvalsvik <jkv@gcc.gnu.org>:

https://gcc.gnu.org/g:18e881ebd9f4b9429c652a81b8ceee84275bdade

commit r14-9973-g18e881ebd9f4b9429c652a81b8ceee84275bdade
Author: Jørgen Kvalsvik <j@lambda.is>
Date:   Mon Apr 15 14:14:26 2024 +0200

    Guard longjmp in test to not inf loop [PR114720]

    Guard the longjmp to not infinitely loop. The longjmp (jump) function is
    called unconditionally to make test flow simpler, but the jump
    destination would return to a point in main that would call longjmp
    again. The longjmp is really there to exercise the then-branch of
    setjmp, to verify coverage is accurately counted in the presence of
    complex edges.

            PR gcov-profile/114720

    gcc/testsuite/ChangeLog:

            * gcc.misc-tests/gcov-22.c: Guard longjmp to not loop.

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

* [Bug testsuite/114720] gcc.misc-tests/gcov-22.c loops
  2024-04-15  8:50 [Bug gcov-profile/114720] New: gcc.misc-tests/gcov-22.c loops ro at gcc dot gnu.org
  2024-04-15 13:34 ` [Bug gcov-profile/114720] " cvs-commit at gcc dot gnu.org
@ 2024-04-15 15:54 ` pinskia at gcc dot gnu.org
  1 sibling, 0 replies; 3+ messages in thread
From: pinskia at gcc dot gnu.org @ 2024-04-15 15:54 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
          Component|gcov-profile                |testsuite
           Keywords|                            |testsuite-fail
             Status|UNCONFIRMED                 |RESOLVED
   Target Milestone|---                         |14.0
         Resolution|---                         |FIXED

--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Fixed.

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

end of thread, other threads:[~2024-04-15 15:54 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-04-15  8:50 [Bug gcov-profile/114720] New: gcc.misc-tests/gcov-22.c loops ro at gcc dot gnu.org
2024-04-15 13:34 ` [Bug gcov-profile/114720] " cvs-commit at gcc dot gnu.org
2024-04-15 15:54 ` [Bug testsuite/114720] " 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).