public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/37750]  New: a lot of crashes with tree optimizations on mingw
@ 2008-10-06 17:35 sherpya at netfarm dot it
  2008-10-06 21:18 ` [Bug target/37750] " pinskia at gcc dot gnu dot org
                   ` (12 more replies)
  0 siblings, 13 replies; 15+ messages in thread
From: sherpya at netfarm dot it @ 2008-10-06 17:35 UTC (permalink / raw)
  To: gcc-bugs

while testing ffmpeg compiled with gcc 4.3.3 from 4.3 trunk
I got a lot of crashes especially in snow encoding testcase

by using:
-fno-tree-dominator-opts -fno-tree-vrp -fno-dce -fno-tree-ch

I get no crashes

gcc 4.4 has same problems,

I've already filled a bug about tree-ch, that corrupts the stack
on win32 (looks like it's related to alloca())


-- 
           Summary: a lot of crashes with tree optimizations on mingw
           Product: gcc
           Version: 4.3.3
            Status: UNCONFIRMED
          Severity: critical
          Priority: P3
         Component: tree-optimization
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: sherpya at netfarm dot it
 GCC build triplet: i686-pc-mingw32
  GCC host triplet: i686-pc-mingw32
GCC target triplet: i686-pc-mingw32


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


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

* [Bug target/37750] a lot of crashes with tree optimizations on mingw
  2008-10-06 17:35 [Bug tree-optimization/37750] New: a lot of crashes with tree optimizations on mingw sherpya at netfarm dot it
@ 2008-10-06 21:18 ` pinskia at gcc dot gnu dot org
  2008-10-06 22:36 ` sherpya at netfarm dot it
                   ` (11 subsequent siblings)
  12 siblings, 0 replies; 15+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2008-10-06 21:18 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from pinskia at gcc dot gnu dot org  2008-10-06 21:17 -------
No other target has this issue except Win32.  I am going to say mingw support
for alloca is broken somehow.


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |pinskia at gcc dot gnu dot
                   |                            |org
           Severity|critical                    |normal
          Component|tree-optimization           |target
           Keywords|                            |wrong-code


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


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

* [Bug target/37750] a lot of crashes with tree optimizations on mingw
  2008-10-06 17:35 [Bug tree-optimization/37750] New: a lot of crashes with tree optimizations on mingw sherpya at netfarm dot it
  2008-10-06 21:18 ` [Bug target/37750] " pinskia at gcc dot gnu dot org
@ 2008-10-06 22:36 ` sherpya at netfarm dot it
  2008-10-07  7:34 ` rguenth at gcc dot gnu dot org
                   ` (10 subsequent siblings)
  12 siblings, 0 replies; 15+ messages in thread
From: sherpya at netfarm dot it @ 2008-10-06 22:36 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from sherpya at netfarm dot it  2008-10-06 22:34 -------
this problem started with 4.3, 4.3.2 on debian linux hasn't these problems 


-- 


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


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

* [Bug target/37750] a lot of crashes with tree optimizations on mingw
  2008-10-06 17:35 [Bug tree-optimization/37750] New: a lot of crashes with tree optimizations on mingw sherpya at netfarm dot it
  2008-10-06 21:18 ` [Bug target/37750] " pinskia at gcc dot gnu dot org
  2008-10-06 22:36 ` sherpya at netfarm dot it
@ 2008-10-07  7:34 ` rguenth at gcc dot gnu dot org
  2008-10-07  9:39 ` sherpya at netfarm dot it
                   ` (9 subsequent siblings)
  12 siblings, 0 replies; 15+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2008-10-07  7:34 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from rguenth at gcc dot gnu dot org  2008-10-07 07:32 -------
As usual we would need preprocessed source as a testcase.


-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |WAITING


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


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

* [Bug target/37750] a lot of crashes with tree optimizations on mingw
  2008-10-06 17:35 [Bug tree-optimization/37750] New: a lot of crashes with tree optimizations on mingw sherpya at netfarm dot it
                   ` (2 preceding siblings ...)
  2008-10-07  7:34 ` rguenth at gcc dot gnu dot org
@ 2008-10-07  9:39 ` sherpya at netfarm dot it
  2008-10-07 12:49 ` sherpya at netfarm dot it
                   ` (8 subsequent siblings)
  12 siblings, 0 replies; 15+ messages in thread
From: sherpya at netfarm dot it @ 2008-10-07  9:39 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from sherpya at netfarm dot it  2008-10-07 09:38 -------
unfortunately snow.c is a very big file, I'll try to find a shorter example,
but if the problem is in alloca() the generated asm will not be so usefull


-- 


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


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

* [Bug target/37750] a lot of crashes with tree optimizations on mingw
  2008-10-06 17:35 [Bug tree-optimization/37750] New: a lot of crashes with tree optimizations on mingw sherpya at netfarm dot it
                   ` (3 preceding siblings ...)
  2008-10-07  9:39 ` sherpya at netfarm dot it
@ 2008-10-07 12:49 ` sherpya at netfarm dot it
  2008-10-07 13:25 ` sherpya at netfarm dot it
                   ` (7 subsequent siblings)
  12 siblings, 0 replies; 15+ messages in thread
From: sherpya at netfarm dot it @ 2008-10-07 12:49 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from sherpya at netfarm dot it  2008-10-07 12:48 -------
*** Bug 37584 has been marked as a duplicate of this bug. ***


-- 


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


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

* [Bug target/37750] a lot of crashes with tree optimizations on mingw
  2008-10-06 17:35 [Bug tree-optimization/37750] New: a lot of crashes with tree optimizations on mingw sherpya at netfarm dot it
                   ` (4 preceding siblings ...)
  2008-10-07 12:49 ` sherpya at netfarm dot it
@ 2008-10-07 13:25 ` sherpya at netfarm dot it
  2008-10-07 13:28 ` sherpya at netfarm dot it
                   ` (6 subsequent siblings)
  12 siblings, 0 replies; 15+ messages in thread
From: sherpya at netfarm dot it @ 2008-10-07 13:25 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from sherpya at netfarm dot it  2008-10-07 13:23 -------
first bt, (pls tell me if you need output of leave temps, generated asm
preprocessed or other stuff)

Program received signal SIGSEGV, Segmentation fault.
0x0092c4c2 in _alloca ()
(gdb) bt
#0  0x0092c4c2 in _alloca ()
#1  0x005c7462 in get_dc (s=0x6230030, mb_x=0, mb_y=0, plane_index=0) at
libavcodec/snow.c:2426
#2  0x005cff6a in iterative_me (s=0x6230030) at libavcodec/snow.c:3126
#3  0x005d7467 in encode_blocks (s=0x6230030, search=1) at
libavcodec/snow.c:2074
#4  0x005d7a2a in encode_frame (avctx=0x5aa3f90,
    buf=0x5fe06c0 "<BINARY DATA REMOVED>"..., buf_size=262144, data=0x22eda8)
at libavcodec/snow.c:4268
#5  0x00499513 in avcodec_encode_video (avctx=0x5aa3f90,
    buf=0x5fe06c0 "<BINARY DATA REMOVED>"..., buf_size=262144, pict=0x22eda8)
at libavcodec/utils.c:894
#6  0x00405626 in output_packet (ist=0x5ed6450, ist_index=0,
ost_table=0x5aa4390, nb_ostreams=1, pkt=0x22fed8) at ffmpeg.c:954
#7  0x00409269 in av_encode (output_files=0xb6b378, nb_output_files=1,
input_files=0xb6a608, nb_input_files=1, stream_maps=0xb6b3c8, nb_stream_maps=0)
    at ffmpeg.c:2116
#8  0x00409761 in main (argc=Cannot access memory at address 0x0
) at ffmpeg.c:3888


-- 


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


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

* [Bug target/37750] a lot of crashes with tree optimizations on mingw
  2008-10-06 17:35 [Bug tree-optimization/37750] New: a lot of crashes with tree optimizations on mingw sherpya at netfarm dot it
                   ` (5 preceding siblings ...)
  2008-10-07 13:25 ` sherpya at netfarm dot it
@ 2008-10-07 13:28 ` sherpya at netfarm dot it
  2008-10-07 13:31 ` sherpya at netfarm dot it
                   ` (5 subsequent siblings)
  12 siblings, 0 replies; 15+ messages in thread
From: sherpya at netfarm dot it @ 2008-10-07 13:28 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #7 from sherpya at netfarm dot it  2008-10-07 13:27 -------
compile flags

OPTFLAGS=-O3 -fno-common -g3 -march=native -mtune=native -pipe
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_ISOC99_SOURCE
-D_POSIX_C_SOURCE=200112 -fasm -std=c99 -fomit-frame-pointer -DPTW32_STATIC_LIB
-g3 -Wdeclaration-after-statement -Wall -Wno-switch -Wdisabled-optimization
-Wpointer-arith -Wredundant-decls -Wno-pointer-sign -Wcast-qual -Wwrite-strings
-Wtype-limits -O2 -fno-math-errno -fno-signed-zeros

-O3 -fno-common -march=native -mtune=native -pipe where added by me
(-fno-common is needed to avoid crash in sse code)


-- 


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


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

* [Bug target/37750] a lot of crashes with tree optimizations on mingw
  2008-10-06 17:35 [Bug tree-optimization/37750] New: a lot of crashes with tree optimizations on mingw sherpya at netfarm dot it
                   ` (6 preceding siblings ...)
  2008-10-07 13:28 ` sherpya at netfarm dot it
@ 2008-10-07 13:31 ` sherpya at netfarm dot it
  2008-10-07 13:37 ` sherpya at netfarm dot it
                   ` (4 subsequent siblings)
  12 siblings, 0 replies; 15+ messages in thread
From: sherpya at netfarm dot it @ 2008-10-07 13:31 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #8 from sherpya at netfarm dot it  2008-10-07 13:29 -------
another crash in snow, this time argc/argv is not screwed

Program received signal SIGSEGV, Segmentation fault.
0x0092c4c2 in _alloca ()
(gdb) bt
#0  0x0092c4c2 in _alloca ()
#1  0x005d7de7 in encode_frame (avctx=0x5aa3f20,
    buf=0x5fda480 "<BINARY DATA REMOVED>"..., buf_size=405504, data=0x22eda8)
at libavcodec/snow.c:2426
#2  0x00499513 in avcodec_encode_video (avctx=0x5aa3f20,
    buf=0x5fda480 "<BINARY DATA REMOVED>"..., buf_size=405504, pict=0x22eda8)
at libavcodec/utils.c:894
#3  0x00405626 in output_packet (ist=0x5ed6450, ist_index=0,
ost_table=0x5cd6470, nb_ostreams=1, pkt=0x22fed8) at ffmpeg.c:954
#4  0x00409269 in av_encode (output_files=0xb6b378, nb_output_files=1,
input_files=0xb6a608, nb_input_files=1, stream_maps=0xb6b3c8, nb_stream_maps=0)
    at ffmpeg.c:2116
#5  0x00409761 in main (argc=95043360, argv=0x3f4998) at ffmpeg.c:3888


-- 


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


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

* [Bug target/37750] a lot of crashes with tree optimizations on mingw
  2008-10-06 17:35 [Bug tree-optimization/37750] New: a lot of crashes with tree optimizations on mingw sherpya at netfarm dot it
                   ` (7 preceding siblings ...)
  2008-10-07 13:31 ` sherpya at netfarm dot it
@ 2008-10-07 13:37 ` sherpya at netfarm dot it
  2009-06-24 10:17 ` ktietz at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  12 siblings, 0 replies; 15+ messages in thread
From: sherpya at netfarm dot it @ 2008-10-07 13:37 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #9 from sherpya at netfarm dot it  2008-10-07 13:35 -------
sqv1

Program received signal SIGSEGV, Segmentation fault.
0x0092c4c2 in _alloca ()
(gdb) bt
#0  0x0092c4c2 in _alloca ()
#1  0x005e3338 in svq1_encode_plane (s=0x5a9f2c0, plane=<value optimized out>,
    src_plane=0x5ac9fa0 "<BINARY DATA REMOVED>"..., ref_plane=0x6063010 '\200'
<repeats 200 times>...,
    decoded_plane=0x6089300 '\200' <repeats 200 times>..., width=352,
height=288, src_stride=352, stride=416) at libavcodec/svq1enc.c:363
#2  0x005e467a in svq1_encode_frame (avctx=0x5aa3eb0, buf=0x5fe05a0 "",
buf_size=405504, data=0x22eda8) at libavcodec/svq1enc.c:541
#3  0x00499513 in avcodec_encode_video (avctx=0x5aa3eb0, buf=0x5fe05a0 "",
buf_size=405504, pict=0x22eda8) at libavcodec/utils.c:894
#4  0x00405626 in output_packet (ist=0x5ed6450, ist_index=0,
ost_table=0x5ac9e00, nb_ostreams=1, pkt=0x22fed8) at ffmpeg.c:954
#5  0x00409269 in av_encode (output_files=0xb6b378, nb_output_files=1,
input_files=0xb6a608, nb_input_files=1, stream_maps=0xb6b3c8, nb_stream_maps=0)
    at ffmpeg.c:2116
#6  0x00409761 in main (argc=Cannot access memory at address 0x1000000
) at ffmpeg.c:3888


-- 


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


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

* [Bug target/37750] a lot of crashes with tree optimizations on mingw
  2008-10-06 17:35 [Bug tree-optimization/37750] New: a lot of crashes with tree optimizations on mingw sherpya at netfarm dot it
                   ` (8 preceding siblings ...)
  2008-10-07 13:37 ` sherpya at netfarm dot it
@ 2009-06-24 10:17 ` ktietz at gcc dot gnu dot org
  2009-06-24 11:43 ` sherpya at netfarm dot it
                   ` (2 subsequent siblings)
  12 siblings, 0 replies; 15+ messages in thread
From: ktietz at gcc dot gnu dot org @ 2009-06-24 10:17 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #10 from ktietz at gcc dot gnu dot org  2009-06-24 10:17 -------
Does this issue appears also, when using builtin alloca version? As I noticed
does the switch -fno-builtin shows explict broken _alloca for x64. The
call-save area isn't adjusted and compiler seems not to take care here


-- 


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


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

* [Bug target/37750] a lot of crashes with tree optimizations on mingw
  2008-10-06 17:35 [Bug tree-optimization/37750] New: a lot of crashes with tree optimizations on mingw sherpya at netfarm dot it
                   ` (9 preceding siblings ...)
  2009-06-24 10:17 ` ktietz at gcc dot gnu dot org
@ 2009-06-24 11:43 ` sherpya at netfarm dot it
  2009-06-24 23:22 ` sherpya at netfarm dot it
  2010-05-25 12:09 ` dbkr at mxtelecom dot com
  12 siblings, 0 replies; 15+ messages in thread
From: sherpya at netfarm dot it @ 2009-06-24 11:43 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #11 from sherpya at netfarm dot it  2009-06-24 11:42 -------
I'm using 4.5 from svn, with -O2 and looks like not affected
4.3 and 4.4 are almost unusable on mingw (at least my builds)
something changed in 4.5 branch,
I've not tested further 4.3 or .4.4 since I was using 4.2 then switched to 4.5
when it started to work on mingw


-- 


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


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

* [Bug target/37750] a lot of crashes with tree optimizations on mingw
  2008-10-06 17:35 [Bug tree-optimization/37750] New: a lot of crashes with tree optimizations on mingw sherpya at netfarm dot it
                   ` (10 preceding siblings ...)
  2009-06-24 11:43 ` sherpya at netfarm dot it
@ 2009-06-24 23:22 ` sherpya at netfarm dot it
  2010-05-25 12:09 ` dbkr at mxtelecom dot com
  12 siblings, 0 replies; 15+ messages in thread
From: sherpya at netfarm dot it @ 2009-06-24 23:22 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #12 from sherpya at netfarm dot it  2009-06-24 23:22 -------
however 4.5 is still far from being stable as 4.2, I get many crashes while
using complied mplayer (it's a stress test for gcc :))

Unfortunately I had no much time to debug mplayer builds


-- 


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


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

* [Bug target/37750] a lot of crashes with tree optimizations on mingw
  2008-10-06 17:35 [Bug tree-optimization/37750] New: a lot of crashes with tree optimizations on mingw sherpya at netfarm dot it
                   ` (11 preceding siblings ...)
  2009-06-24 23:22 ` sherpya at netfarm dot it
@ 2010-05-25 12:09 ` dbkr at mxtelecom dot com
  12 siblings, 0 replies; 15+ messages in thread
From: dbkr at mxtelecom dot com @ 2010-05-25 12:09 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #13 from dbkr at mxtelecom dot com  2010-05-25 12:09 -------
I've just run into this problem too with MinGW's packaged GCC 4.4.0. It was
working fine for some time but recently started crashing when both libevent and
the C++ program that libevent was calling back into were both compiled at at
least -O1. This causes libevent to use the edi register whose value is
corrupted (set to null, actually) by a callback into our C++ program.

The C++ app seems to use the edi register at any optimisation level and in any
case seems to push it onto the stack and pop it off at the end of the callback,
but some kind of stack corruption goes on within the callback that means the
value popped off the stack at the end is zero when the app is compiled at -O1.

Compiling the app at -O0 or at -O1 with -fno-dce prevents the crash, although
compiling with -O2 -fno-dce causes the same crash.


-- 

dbkr at mxtelecom dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |dbkr at mxtelecom dot com


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


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

* [Bug target/37750] a lot of crashes with tree optimizations on mingw
       [not found] <bug-37750-4@http.gcc.gnu.org/bugzilla/>
@ 2012-01-13  6:49 ` pinskia at gcc dot gnu.org
  0 siblings, 0 replies; 15+ messages in thread
From: pinskia at gcc dot gnu.org @ 2012-01-13  6:49 UTC (permalink / raw)
  To: gcc-bugs

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

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

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

--- Comment #14 from Andrew Pinski <pinskia at gcc dot gnu.org> 2012-01-13 06:48:24 UTC ---
alloca has been fixed already so closing as fixed.


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

end of thread, other threads:[~2012-01-13  6:49 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-10-06 17:35 [Bug tree-optimization/37750] New: a lot of crashes with tree optimizations on mingw sherpya at netfarm dot it
2008-10-06 21:18 ` [Bug target/37750] " pinskia at gcc dot gnu dot org
2008-10-06 22:36 ` sherpya at netfarm dot it
2008-10-07  7:34 ` rguenth at gcc dot gnu dot org
2008-10-07  9:39 ` sherpya at netfarm dot it
2008-10-07 12:49 ` sherpya at netfarm dot it
2008-10-07 13:25 ` sherpya at netfarm dot it
2008-10-07 13:28 ` sherpya at netfarm dot it
2008-10-07 13:31 ` sherpya at netfarm dot it
2008-10-07 13:37 ` sherpya at netfarm dot it
2009-06-24 10:17 ` ktietz at gcc dot gnu dot org
2009-06-24 11:43 ` sherpya at netfarm dot it
2009-06-24 23:22 ` sherpya at netfarm dot it
2010-05-25 12:09 ` dbkr at mxtelecom dot com
     [not found] <bug-37750-4@http.gcc.gnu.org/bugzilla/>
2012-01-13  6:49 ` 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).