public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/30247] New: [4.2/4.3] Gcc miscompiles MPlayer when any optimization is used
@ 2006-12-18 10:09 ismail at pardus dot org dot tr
2006-12-18 10:10 ` [Bug c/30247] " ismail at pardus dot org dot tr
` (5 more replies)
0 siblings, 6 replies; 7+ messages in thread
From: ismail at pardus dot org dot tr @ 2006-12-18 10:09 UTC (permalink / raw)
To: gcc-bugs
gcc 4.2 branch and gcc 4.3 SVN snapshot seems to miscompile MPlayer's mp_msg.c
resulting in a crash. gcc 3.4.6 is ok. During compilation no warning is issued.
Gcc tested is :
Using built-in specs.
Target: i686-pc-linux-gnu
Configured with: ../gcc/configure --prefix=/home/cartman/gcc_4.2
--enable-clocale=gnu --enable-shared --enable-threads=posix
--enable-__cxa_atexit --enable-languages=c,c++ --disable-nls
Thread model: posix
gcc version 4.2.0 20061217 (prerelease)
I will attach two files:
mp_msg_compiled_with_O1_crashes.i produced with :
cc -O1 -Wdeclaration-after-statement -march=pentium-m -mtune=pentium-m -pipe
-ffast-math -fomit-frame-pointer -D_REENTRANT -D_LARGEFILE_SOURCE
-D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -I/usr/include -I/usr/include/
-I/usr/include/SDL -D_REENTRANT -I/usr/include -I/usr/include/dvdnav
-I/usr/include/freetype2 -I. -I./libavutil -I./libavcodec -c -save-temps
mp_msg.c
mp_msg_compiled_with_O0_works.i produced with:
cc -O0 -Wdeclaration-after-statement -march=pentium-m -mtune=pentium-m -pipe
-ffast-math -fomit-frame-pointer -D_REENTRANT -D_LARGEFILE_SOURCE
-D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -I/usr/include -I/usr/include/
-I/usr/include/SDL -D_REENTRANT -I/usr/include -I/usr/include/dvdnav
-I/usr/include/freetype2 -I. -I./libavutil -I./libavcodec -c -save-temps
mp_msg.c
--
Summary: [4.2/4.3] Gcc miscompiles MPlayer when any optimization
is used
Product: gcc
Version: 4.2.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: ismail at pardus dot org dot tr
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30247
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c/30247] [4.2/4.3] Gcc miscompiles MPlayer when any optimization is used
2006-12-18 10:09 [Bug c/30247] New: [4.2/4.3] Gcc miscompiles MPlayer when any optimization is used ismail at pardus dot org dot tr
@ 2006-12-18 10:10 ` ismail at pardus dot org dot tr
2006-12-18 10:11 ` ismail at pardus dot org dot tr
` (4 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: ismail at pardus dot org dot tr @ 2006-12-18 10:10 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from ismail at pardus dot org dot tr 2006-12-18 10:10 -------
Created an attachment (id=12823)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=12823&action=view)
mp_msg.c compiled with -O0
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30247
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c/30247] [4.2/4.3] Gcc miscompiles MPlayer when any optimization is used
2006-12-18 10:09 [Bug c/30247] New: [4.2/4.3] Gcc miscompiles MPlayer when any optimization is used ismail at pardus dot org dot tr
2006-12-18 10:10 ` [Bug c/30247] " ismail at pardus dot org dot tr
@ 2006-12-18 10:11 ` ismail at pardus dot org dot tr
2006-12-18 10:16 ` ismail at pardus dot org dot tr
` (3 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: ismail at pardus dot org dot tr @ 2006-12-18 10:11 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from ismail at pardus dot org dot tr 2006-12-18 10:11 -------
Created an attachment (id=12824)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=12824&action=view)
mp_msg.c compiled with -O1
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30247
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c/30247] [4.2/4.3] Gcc miscompiles MPlayer when any optimization is used
2006-12-18 10:09 [Bug c/30247] New: [4.2/4.3] Gcc miscompiles MPlayer when any optimization is used ismail at pardus dot org dot tr
2006-12-18 10:10 ` [Bug c/30247] " ismail at pardus dot org dot tr
2006-12-18 10:11 ` ismail at pardus dot org dot tr
@ 2006-12-18 10:16 ` ismail at pardus dot org dot tr
2006-12-18 10:26 ` [Bug middle-end/30247] " pinskia at gcc dot gnu dot org
` (2 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: ismail at pardus dot org dot tr @ 2006-12-18 10:16 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from ismail at pardus dot org dot tr 2006-12-18 10:15 -------
Valgrinding the crashing mplayer shows:
==5836== Invalid read of size 1
==5836== at 0x401E776: strlen
(in /usr/lib/valgrind/x86-linux/vgpreload_memcheck.so)
==5836== by 0x4B4049E: fprintf (in /lib/libc-2.3.6.so)
==5836== by 0x81098CF: open (vf_ass.c:395)
==5836== by 0x80DC4F6: vf_open_plugin (vf.c:466)
==5836== by 0x80831F6: reinit_video_chain (mplayer.c:3321)
==5836== by 0x8086699: main (mplayer.c:4517)
==5836== Address 0x5248003E is not stack'd, malloc'd or (recently) free'd
which shows line 182 in mp_msg.c which is something like:
fprintf(stream, "\033[%d;3%dm%9s\033[0;37m: ",c2>>3,c2&7,
mod_text[mod]);
If I replace mod_text[mod] with "foo" it doesn't crash anymore.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30247
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug middle-end/30247] [4.2/4.3] Gcc miscompiles MPlayer when any optimization is used
2006-12-18 10:09 [Bug c/30247] New: [4.2/4.3] Gcc miscompiles MPlayer when any optimization is used ismail at pardus dot org dot tr
` (2 preceding siblings ...)
2006-12-18 10:16 ` ismail at pardus dot org dot tr
@ 2006-12-18 10:26 ` pinskia at gcc dot gnu dot org
2006-12-18 10:39 ` ismail at pardus dot org dot tr
2006-12-19 9:32 ` ismail at pardus dot org dot tr
5 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-12-18 10:26 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from pinskia at gcc dot gnu dot org 2006-12-18 10:26 -------
There is no obvious what is wrong from the tree dumps.
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Component|c |middle-end
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30247
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug middle-end/30247] [4.2/4.3] Gcc miscompiles MPlayer when any optimization is used
2006-12-18 10:09 [Bug c/30247] New: [4.2/4.3] Gcc miscompiles MPlayer when any optimization is used ismail at pardus dot org dot tr
` (3 preceding siblings ...)
2006-12-18 10:26 ` [Bug middle-end/30247] " pinskia at gcc dot gnu dot org
@ 2006-12-18 10:39 ` ismail at pardus dot org dot tr
2006-12-19 9:32 ` ismail at pardus dot org dot tr
5 siblings, 0 replies; 7+ messages in thread
From: ismail at pardus dot org dot tr @ 2006-12-18 10:39 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from ismail at pardus dot org dot tr 2006-12-18 10:39 -------
I tried to follow http://gcc.gnu.org/bugs.html#need . Anything else I should
provide?
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30247
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug middle-end/30247] [4.2/4.3] Gcc miscompiles MPlayer when any optimization is used
2006-12-18 10:09 [Bug c/30247] New: [4.2/4.3] Gcc miscompiles MPlayer when any optimization is used ismail at pardus dot org dot tr
` (4 preceding siblings ...)
2006-12-18 10:39 ` ismail at pardus dot org dot tr
@ 2006-12-19 9:32 ` ismail at pardus dot org dot tr
5 siblings, 0 replies; 7+ messages in thread
From: ismail at pardus dot org dot tr @ 2006-12-19 9:32 UTC (permalink / raw)
To: gcc-bugs
------- Comment #6 from ismail at pardus dot org dot tr 2006-12-19 09:31 -------
Another MPlayer bug exposed by gcc, sorry guys!
--
ismail at pardus dot org dot tr changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |INVALID
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30247
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2006-12-19 9:32 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-12-18 10:09 [Bug c/30247] New: [4.2/4.3] Gcc miscompiles MPlayer when any optimization is used ismail at pardus dot org dot tr
2006-12-18 10:10 ` [Bug c/30247] " ismail at pardus dot org dot tr
2006-12-18 10:11 ` ismail at pardus dot org dot tr
2006-12-18 10:16 ` ismail at pardus dot org dot tr
2006-12-18 10:26 ` [Bug middle-end/30247] " pinskia at gcc dot gnu dot org
2006-12-18 10:39 ` ismail at pardus dot org dot tr
2006-12-19 9:32 ` ismail at pardus dot org dot tr
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).