public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug testsuite/49979] New: FAIL: gcc.dg/20030711-1.c execution test
@ 2011-08-04 17:00 danglin at gcc dot gnu.org
  2011-08-04 17:30 ` [Bug testsuite/49979] " danglin at gcc dot gnu.org
  2011-08-05  8:40 ` rguenth at gcc dot gnu.org
  0 siblings, 2 replies; 3+ messages in thread
From: danglin at gcc dot gnu.org @ 2011-08-04 17:00 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49979

           Summary: FAIL: gcc.dg/20030711-1.c execution test
           Product: gcc
           Version: 4.7.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: testsuite
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: danglin@gcc.gnu.org
              Host: hppa*-*-*
            Target: hppa*-*-*
             Build: hppa*-*-*


The PA backend does not have cmpstrnsi, so __builtin_strncmp is not expanded.
As a result, the strncmp library call is used in function test.

Because the compare operation extends beyond the mmap'd region after unmapping,
it may cause a segv.  It is not clear at this time why the segv isn't
consistent.  I have never seen it with HP-UX 11.11 or Linux.

First seen on HP-UX 11.00:

-bash-3.2$ ./xgcc -B./ -v
Reading specs from ./specs
COLLECT_GCC=./xgcc
COLLECT_LTO_WRAPPER=./lto-wrapper
Target: hppa64-hp-hpux11.00
Configured with: ../gcc/configure --with-gnu-as --with-as=/opt/gnu64/bin/as
--with-ld=/usr/ccs/bin/ld --enable-shared --with-local-prefix=/opt/gnu64
--prefix=/opt/gnu64/gcc/gcc-4.7 --build=hppa64-hp-hpux11.00 --disable-nls
--disable-build-poststage1-with-cxx --with-gmp=/opt/gnu64/gcc/gmp
--enable-languages=c,c++,fortran,objc,obj-c++
Thread model: posix
gcc version 4.7.0 20110731 (experimental) [trunk revision 176976] (GCC)


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

* [Bug testsuite/49979] FAIL: gcc.dg/20030711-1.c execution test
  2011-08-04 17:00 [Bug testsuite/49979] New: FAIL: gcc.dg/20030711-1.c execution test danglin at gcc dot gnu.org
@ 2011-08-04 17:30 ` danglin at gcc dot gnu.org
  2011-08-05  8:40 ` rguenth at gcc dot gnu.org
  1 sibling, 0 replies; 3+ messages in thread
From: danglin at gcc dot gnu.org @ 2011-08-04 17:30 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49979

--- Comment #1 from John David Anglin <danglin at gcc dot gnu.org> 2011-08-04 17:30:29 UTC ---
I think this is a HP-UX 11.00 libc bug exposed by the following change:

2011-07-25  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>

        * lib/target-supports.exp (check_effective_target_mmap): New proc.

        * gcc.c-torture/execute/loop-2f.c: Remove #ifdef __unix__.
        * gcc.c-torture/execute/loop-2g.c: Likewise.
        * gcc.c-torture/execute/loop-2f.x: Load target-supports.exp.
        Require mmap support.
        * gcc.c-torture/execute/loop-2g.x: Likewise.
        * gcc.dg/20030711-1.c: Replace dg-do target list by mmap.
        (MAP_ANON): Provide default.
        * gcc.dg/20050826-1.c: Likewise.
        * gcc.target/i386/pr36533.c: Likewise.
        * gcc.dg/vect/pr49038.c: Remove dg-do run.
        Use dg-require-effective-target mmap.

There was a similar bug in HP-UX 10.20 where strncmp would segmentation fault
when one of the strings ended adjacent to an unmapped page boundary.  This
was supposedly fixed...


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

* [Bug testsuite/49979] FAIL: gcc.dg/20030711-1.c execution test
  2011-08-04 17:00 [Bug testsuite/49979] New: FAIL: gcc.dg/20030711-1.c execution test danglin at gcc dot gnu.org
  2011-08-04 17:30 ` [Bug testsuite/49979] " danglin at gcc dot gnu.org
@ 2011-08-05  8:40 ` rguenth at gcc dot gnu.org
  1 sibling, 0 replies; 3+ messages in thread
From: rguenth at gcc dot gnu.org @ 2011-08-05  8:40 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49979

Richard Guenther <rguenth at gcc dot gnu.org> changed:

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

--- Comment #2 from Richard Guenther <rguenth at gcc dot gnu.org> 2011-08-05 08:38:49 UTC ---
Yes, the testcase looks ok to me.

Thus -> OS bug.  You may choose to dg-skip it for the particular OS version
or just leave it failing and add a comment.


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

end of thread, other threads:[~2011-08-05  8:40 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-08-04 17:00 [Bug testsuite/49979] New: FAIL: gcc.dg/20030711-1.c execution test danglin at gcc dot gnu.org
2011-08-04 17:30 ` [Bug testsuite/49979] " danglin at gcc dot gnu.org
2011-08-05  8:40 ` rguenth 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).