public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/44776] FAIL: gcc.dg/matrix/transpose-3.c execution,    -fprofile-use -fipa-matrix-reorg -fdump-ipa-matrix-reorg -O3 -fwhole-program
       [not found] <bug-44776-4@http.gcc.gnu.org/bugzilla/>
@ 2010-10-18 17:06 ` davek at gcc dot gnu.org
  2010-10-19 23:01 ` zsojka at seznam dot cz
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: davek at gcc dot gnu.org @ 2010-10-18 17:06 UTC (permalink / raw)
  To: gcc-bugs

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

Dave Korn <davek at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |davek at gcc dot gnu.org

--- Comment #10 from Dave Korn <davek at gcc dot gnu.org> 2010-10-18 17:06:11 UTC ---
Also fails on i686-pc-cygwin since at least r.161958 (still fails at r.165450)

FAIL: gcc.dg/matrix/transpose-3.c execution,    -fprofile-use
-fipa-matrix-reorg
 -fdump-ipa-matrix-reorg -O3 -fwhole-program


In this case, it turns out to be a double free:

$ /gnu/gcc/obj-lto/gcc/xgcc -B/gnu/gcc/obj-lto/gcc/ /gnu/gcc/gcc/gcc/testsuite/
gcc.dg/matrix/transpose-3.c -fprofile-use -fipa-matrix-reorg -fdump-ipa-matrix-
reorg -O3  -fwhole-program -o ./transpose-3.x02
/gnu/gcc/gcc/gcc/testsuite/gcc.dg/matrix/transpose-3.c: In function 'mem_init':
/gnu/gcc/gcc/gcc/testsuite/gcc.dg/matrix/transpose-3.c:96:1: note: file
/gnu/gcc
/obj-lto/gcc/testsuite/transpose-3.gcda not found, execution counts estimated

$ gdb ./transpose-3.x02
GNU gdb 6.8.0.20080328-cvs (cygwin-special)
Copyright (C) 2008 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "i686-pc-cygwin"...
(gdb) b main
Breakpoint 1 at 0x401176
(gdb) r
Starting program: /gnu/gcc/obj-lto/gcc/testsuite/transpose-3.x02
[New thread 2236.0x184]
[New thread 2236.0xc6c]

Breakpoint 1, 0x00401176 in main ()
(gdb) b free
Breakpoint 2 at 0x610725e0: file
/gnu/winsup/src.clean/winsup/cygwin/malloc_wrap
per.cc, line 41.
(gdb) c
Continuing.
acc to dim2 acc to dim2 acc to dim2 acc to dim2 acc to dim2 acc to dim2 acc to
d
im2 acc to dim2 acc to dim2 acc to dim2 acc to dim2 acc to dim2 acc to dim2 acc
to dim2 acc to dim2 acc to dim2 acc to dim2 acc to dim2 acc to dim2 acc to dim2
acc to dim2 acc to dim2 acc to dim2 acc to dim2
[0][0][0]=0 [0][0][1]=12
[1][0][0]=4 [1][0][1]=16
[2][0][0]=8 [2][0][1]=20

[0][1][0]=1 [0][1][1]=13
[1][1][0]=5 [1][1][1]=17
[2][1][0]=9 [2][1][1]=21

[0][2][0]=2 [0][2][1]=14
[1][2][0]=6 [1][2][1]=18
[2][2][0]=10 [2][2][1]=22

[0][3][0]=3 [0][3][1]=15
[1][3][0]=7 [1][3][1]=19
[2][3][0]=11 [2][3][1]=23


Breakpoint 2, free (p=0x45a080)
    at /gnu/winsup/src.clean/winsup/cygwin/malloc_wrapper.cc:41
41      free (void *p)
Current language:  auto; currently c++
(gdb) c
Continuing.

Breakpoint 2, free (p=0x45a080)
    at /gnu/winsup/src.clean/winsup/cygwin/malloc_wrapper.cc:41
41      free (void *p)
(gdb) c
Continuing.

Program received signal SIGABRT, Aborted.
0x77f88f13 in ?? ()
(gdb)


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

* [Bug tree-optimization/44776] FAIL: gcc.dg/matrix/transpose-3.c execution,    -fprofile-use -fipa-matrix-reorg -fdump-ipa-matrix-reorg -O3 -fwhole-program
       [not found] <bug-44776-4@http.gcc.gnu.org/bugzilla/>
  2010-10-18 17:06 ` [Bug tree-optimization/44776] FAIL: gcc.dg/matrix/transpose-3.c execution, -fprofile-use -fipa-matrix-reorg -fdump-ipa-matrix-reorg -O3 -fwhole-program davek at gcc dot gnu.org
@ 2010-10-19 23:01 ` zsojka at seznam dot cz
  2010-12-20 18:00 ` zsojka at seznam dot cz
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: zsojka at seznam dot cz @ 2010-10-19 23:01 UTC (permalink / raw)
  To: gcc-bugs

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

Zdenek Sojka <zsojka at seznam dot cz> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |zsojka at seznam dot cz

--- Comment #11 from Zdenek Sojka <zsojka at seznam dot cz> 2010-10-19 23:00:48 UTC ---
I am able to reproduce this at x86_64-pc-linux-gnu. Crashes with -fprofile-use
with r165699 and r163636.

However, valgrind reports invalid operations even without -fprofile-*:
(-g is not needed to reproduce)
$ gcc -O -fipa-matrix-reorg -fwhole-program transpose-3.i -g
$ valgrind -q ./a.out >/dev/null
==28612== Invalid free() / delete / delete[]
==28612==    at 0x4C25A2D: free (in
/usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==28612==    by 0x40098D: main (transpose-3.c:45)
==28612==  Address 0x5185100 is 0 bytes inside a block of size 16 free'd
==28612==    at 0x4C25A2D: free (in
/usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==28612==    by 0x40098D: main (transpose-3.c:45)
==28612== 

Removing any of these flags (except -g) makes the problem disappear.


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

* [Bug tree-optimization/44776] FAIL: gcc.dg/matrix/transpose-3.c execution,    -fprofile-use -fipa-matrix-reorg -fdump-ipa-matrix-reorg -O3 -fwhole-program
       [not found] <bug-44776-4@http.gcc.gnu.org/bugzilla/>
  2010-10-18 17:06 ` [Bug tree-optimization/44776] FAIL: gcc.dg/matrix/transpose-3.c execution, -fprofile-use -fipa-matrix-reorg -fdump-ipa-matrix-reorg -O3 -fwhole-program davek at gcc dot gnu.org
  2010-10-19 23:01 ` zsojka at seznam dot cz
@ 2010-12-20 18:00 ` zsojka at seznam dot cz
  2010-12-20 18:02 ` zsojka at seznam dot cz
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: zsojka at seznam dot cz @ 2010-12-20 18:00 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #12 from Zdenek Sojka <zsojka at seznam dot cz> 2010-12-20 18:00:15 UTC ---
Created attachment 22831
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=22831
simpler testcase

Crashes on x86_64-linux, r168061

$ gcc -O -fipa-matrix-reorg -fwhole-program pr44776-2.c
$ ./a.out 
Segmentation fault


With valgrind:
$ valgrind -q ./a.out 
==16712== Invalid write of size 4
==16712==    at 0x4005BC: main (pr44776-2.c:10)
==16712==  Address 0x5186050 is 0 bytes after a block of size 16 alloc'd
==16712==    at 0x4C2648E: malloc (in
/usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==16712==    by 0x4005A7: main (pr44776-2.c:13)
==16712== 
==16712== Invalid read of size 4
==16712==    at 0x4005F9: main (pr44776-2.c:25)
==16712==  Address 0x5186050 is 0 bytes after a block of size 16 alloc'd
==16712==    at 0x4C2648E: malloc (in
/usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==16712==    by 0x4005A7: main (pr44776-2.c:13)
==16712== 
==16712== Invalid write of size 4
==16712==    at 0x400602: main (pr44776-2.c:27)
==16712==  Address 0x5186050 is 0 bytes after a block of size 16 alloc'd
==16712==    at 0x4C2648E: malloc (in
/usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==16712==    by 0x4005A7: main (pr44776-2.c:13)
==16712== 
==16712== Invalid read of size 4
==16712==    at 0x400629: main (pr44776-2.c:25)
==16712==  Address 0x5286040 is not stack'd, malloc'd or (recently) free'd
==16712== 
==16712== Invalid write of size 4
==16712==    at 0x40063F: main (pr44776-2.c:27)
==16712==  Address 0x5286040 is not stack'd, malloc'd or (recently) free'd
==16712==


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

* [Bug tree-optimization/44776] FAIL: gcc.dg/matrix/transpose-3.c execution,    -fprofile-use -fipa-matrix-reorg -fdump-ipa-matrix-reorg -O3 -fwhole-program
       [not found] <bug-44776-4@http.gcc.gnu.org/bugzilla/>
                   ` (2 preceding siblings ...)
  2010-12-20 18:00 ` zsojka at seznam dot cz
@ 2010-12-20 18:02 ` zsojka at seznam dot cz
  2012-01-28 11:33 ` dominiq at lps dot ens.fr
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: zsojka at seznam dot cz @ 2010-12-20 18:02 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #13 from Zdenek Sojka <zsojka at seznam dot cz> 2010-12-20 18:01:46 UTC ---
It crashes with -m32 too, so it isn't specific to target x86_64-apple-darwin10,
nor x86_64 in general


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

* [Bug tree-optimization/44776] FAIL: gcc.dg/matrix/transpose-3.c execution,    -fprofile-use -fipa-matrix-reorg -fdump-ipa-matrix-reorg -O3 -fwhole-program
       [not found] <bug-44776-4@http.gcc.gnu.org/bugzilla/>
                   ` (3 preceding siblings ...)
  2010-12-20 18:02 ` zsojka at seznam dot cz
@ 2012-01-28 11:33 ` dominiq at lps dot ens.fr
  2012-02-08  7:15 ` gary at intrepid dot com
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: dominiq at lps dot ens.fr @ 2012-01-28 11:33 UTC (permalink / raw)
  To: gcc-bugs

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

Dominique d'Humieres <dominiq at lps dot ens.fr> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2012-01-28
     Ever Confirmed|0                           |1

--- Comment #14 from Dominique d'Humieres <dominiq at lps dot ens.fr> 2012-01-28 10:21:44 UTC ---
On x86_64-apple-darwin10 at revision 183653, compiling the test in comment #12
with '-fipa-matrix-reorg -O -fwhole-program' yields an executable that run
without problem (tested under valgrind), while it gives a segmentation fault
when compiled with '-fipa-matrix-reorg -O -fwhole-program -fno-tree-fre'.


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

* [Bug tree-optimization/44776] FAIL: gcc.dg/matrix/transpose-3.c execution,    -fprofile-use -fipa-matrix-reorg -fdump-ipa-matrix-reorg -O3 -fwhole-program
       [not found] <bug-44776-4@http.gcc.gnu.org/bugzilla/>
                   ` (4 preceding siblings ...)
  2012-01-28 11:33 ` dominiq at lps dot ens.fr
@ 2012-02-08  7:15 ` gary at intrepid dot com
  2012-02-08  7:24 ` gary at intrepid dot com
  2012-12-12 15:57 ` howarth at nitro dot med.uc.edu
  7 siblings, 0 replies; 9+ messages in thread
From: gary at intrepid dot com @ 2012-02-08  7:15 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #15 from Gary Funck <gary at intrepid dot com> 2012-02-08 07:14:29 UTC ---
We're seeing a similar failure under openSUSE 12.1 running as a VM, which may
have a somewhat constrained memory environment.

*** glibc detected ***
/home/abuild/rpmbuild/BUILD/[...]/gcc/testsuite/gcc/transpose-3.x02:
free(): invalid pointer: 0x00000000006030b0 ***
======= Backtrace: =========
/lib64/libc.so.6(+0x74c06)[0x7fdcf08c6c06]
/home/abuild/rpmbuild/BUILD/[...]/gcc/testsuite/gcc/transpose-3.x02[0x400e62]
/lib64/libc.so.6(__libc_start_main+0xed)[0x7fdcf087323d]
/home/abuild/rpmbuild/BUILD/[...]/gcc/testsuite/gcc/transpose-3.x02[0x400ed9]


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

* [Bug tree-optimization/44776] FAIL: gcc.dg/matrix/transpose-3.c execution,    -fprofile-use -fipa-matrix-reorg -fdump-ipa-matrix-reorg -O3 -fwhole-program
       [not found] <bug-44776-4@http.gcc.gnu.org/bugzilla/>
                   ` (5 preceding siblings ...)
  2012-02-08  7:15 ` gary at intrepid dot com
@ 2012-02-08  7:24 ` gary at intrepid dot com
  2012-12-12 15:57 ` howarth at nitro dot med.uc.edu
  7 siblings, 0 replies; 9+ messages in thread
From: gary at intrepid dot com @ 2012-02-08  7:24 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #16 from Gary Funck <gary at intrepid dot com> 2012-02-08 07:23:31 UTC ---
(In reply to comment #15)
> We're seeing a similar failure under openSUSE 12.1 running as a VM, which may
> have a somewhat constrained memory environment.

We built with trunk version 183751 circa 2012-01-31.


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

* [Bug tree-optimization/44776] FAIL: gcc.dg/matrix/transpose-3.c execution,    -fprofile-use -fipa-matrix-reorg -fdump-ipa-matrix-reorg -O3 -fwhole-program
       [not found] <bug-44776-4@http.gcc.gnu.org/bugzilla/>
                   ` (6 preceding siblings ...)
  2012-02-08  7:24 ` gary at intrepid dot com
@ 2012-12-12 15:57 ` howarth at nitro dot med.uc.edu
  7 siblings, 0 replies; 9+ messages in thread
From: howarth at nitro dot med.uc.edu @ 2012-12-12 15:57 UTC (permalink / raw)
  To: gcc-bugs


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

Jack Howarth <howarth at nitro dot med.uc.edu> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED

--- Comment #17 from Jack Howarth <howarth at nitro dot med.uc.edu> 2012-12-12 15:57:03 UTC ---
This issue is eliminated by the removal of the matrix-reorg code at...

Author: rguenth
Date: Fri Aug 10 14:19:09 2012
New Revision: 190298

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=190298
Log:
2012-08-10  Richard Guenther  <rguenther@suse.de>

    * Makefile.in (OBJS): Remove matrix-reorg.o.
    (matrix-reorg.o): Remove dependence rule.
    (GTFILES): Remove matrix-reorg.c.
    * matrix-reorg.c: Remove.
    * passes.c (init_optimization_passes): Do not schedule
    pass_ipa_matrix_reorg.
    * tree-pass.h (pass_ipa_matrix_reorg): Remove.
    * common.opt (fipa-matrix-reorg): Stub out.
    * doc/invoke.texi (fipa-matrix-reorg): Remove documentation.

    * gcc.dg/matrix/*.c: Adjust and move ...
    * gcc.dg/torture/: ... here.
    * gcc.dg/matrix: Remove directory.


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

* [Bug tree-optimization/44776] FAIL: gcc.dg/matrix/transpose-3.c execution,    -fprofile-use -fipa-matrix-reorg -fdump-ipa-matrix-reorg -O3 -fwhole-program
  2010-07-02  2:26 [Bug lto/44776] New: FAIL: gcc.dg/matrix/transpose-3.c execution, -fprofile-use -fipa-matrix-reorg -fdump-ipa-matrix-reorg -O3 -fwhole-program -combine howarth at nitro dot med dot uc dot edu
@ 2010-09-17 15:57 ` dominiq at lps dot ens dot fr
  0 siblings, 0 replies; 9+ messages in thread
From: dominiq at lps dot ens dot fr @ 2010-09-17 15:57 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #9 from dominiq at lps dot ens dot fr  2010-09-17 15:57 -------
Apparently the problem is that when compiled with  -fipa-matrix-reorg -O[123s]
-fwhole-program in 64 bit mode, the executable gives:

...
a.out(83070) malloc: *** error for object 0x1001000c0: pointer being freed was
not allocated
*** set a breakpoint in malloc_error_break to debug
Abort

(see comment #0).


-- 


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


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

end of thread, other threads:[~2012-12-12 15:57 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-44776-4@http.gcc.gnu.org/bugzilla/>
2010-10-18 17:06 ` [Bug tree-optimization/44776] FAIL: gcc.dg/matrix/transpose-3.c execution, -fprofile-use -fipa-matrix-reorg -fdump-ipa-matrix-reorg -O3 -fwhole-program davek at gcc dot gnu.org
2010-10-19 23:01 ` zsojka at seznam dot cz
2010-12-20 18:00 ` zsojka at seznam dot cz
2010-12-20 18:02 ` zsojka at seznam dot cz
2012-01-28 11:33 ` dominiq at lps dot ens.fr
2012-02-08  7:15 ` gary at intrepid dot com
2012-02-08  7:24 ` gary at intrepid dot com
2012-12-12 15:57 ` howarth at nitro dot med.uc.edu
2010-07-02  2:26 [Bug lto/44776] New: FAIL: gcc.dg/matrix/transpose-3.c execution, -fprofile-use -fipa-matrix-reorg -fdump-ipa-matrix-reorg -O3 -fwhole-program -combine howarth at nitro dot med dot uc dot edu
2010-09-17 15:57 ` [Bug tree-optimization/44776] FAIL: gcc.dg/matrix/transpose-3.c execution, -fprofile-use -fipa-matrix-reorg -fdump-ipa-matrix-reorg -O3 -fwhole-program dominiq at lps dot ens dot fr

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