NetBSD Problem Report #47132
From asau@inbox.ru Sat Oct 27 10:36:30 2012
Return-Path: <asau@inbox.ru>
Received: from mail.netbsd.org (mail.netbsd.org [149.20.53.66])
by www.NetBSD.org (Postfix) with ESMTP id 66D2C63E3B8
for <gnats-bugs@gnats.NetBSD.org>; Sat, 27 Oct 2012 10:36:29 +0000 (UTC)
Message-Id: <87sj908diz.fsf@inbox.ru>
Date: Sat, 27 Oct 2012 13:33:56 +0400
From: Aleksej Saushev <asau@inbox.ru>
Reply-To: asau@inbox.ru
To: gnats-bugs@gnats.NetBSD.org
Subject: MPlayer crashes (VLC is affected potentially too)
>Number: 47132
>Category: pkg
>Synopsis: MPlayer crashes (VLC is affected potentially too)
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: pkg-manager
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Sat Oct 27 10:40:01 +0000 2012
>Closed-Date:
>Last-Modified: Wed Dec 03 17:45:01 +0000 2014
>Originator: asau@inbox.ru
>Release: NetBSD 6.0_STABLE
>Organization:
>Environment:
System: NetBSD localhost 6.0_STABLE NetBSD 6.0_STABLE (GENERIC) #0: Thu Oct 18 11:07:03 MSK 2012 asau@localhost:/usr/obj/sys/arch/i386/compile/GENERIC i386
Architecture: i386
Machine: i386
>Description:
MPlayer stops with its usual diagnostics:
MPlayer interrupted by signal 11 in module: demux_open
- MPlayer crashed by bad usage of CPU/FPU/RAM.
Recompile MPlayer with --enable-debug and make a 'gdb' backtrace and
disassembly. Details in DOCS/HTML/en/bugreports_what.html#bugreports_crash.
- MPlayer crashed. This shouldn't happen.
VLC dumps core too, it may be related problem or may be not.
>How-To-Repeat:
Run MPlayer, see it crashed.
Rebuild multimedia/mplayer package with "debug" option on and INSTALL_UNSTRIPPED=yes,
replace package, run "gdb --args mplayer <same-file>".
See it crashing with message:
libavformat version 54.6.101 (internal)
libavformat file format detected.
Program received signal SIGSEGV, Segmentation fault.
[Switching to LWP 1]
ff_deblock_v_luma_intra_8_sse2 () at libavcodec/x86/h264_deblock.asm:783
783 DEBLOCK_LUMA_INTRA sse2, v
(gdb) disass
Dump of assembler code for function ff_deblock_v_luma_intra_8_sse2:
0x086abb40 <+0>: push %ebx
0x086abb41 <+1>: push %esi
0x086abb42 <+2>: push %edi
0x086abb43 <+3>: mov 0x10(%esp),%eax
0x086abb47 <+7>: mov 0x14(%esp),%ecx
0x086abb4b <+11>: mov 0x18(%esp),%edx
0x086abb4f <+15>: mov 0x1c(%esp),%ebx
0x086abb53 <+19>: sub $0x60,%esp
0x086abb56 <+22>: lea 0x0(,%ecx,4),%esi
0x086abb5d <+29>: lea (%ecx,%ecx,2),%edi
0x086abb60 <+32>: dec %edx
0x086abb61 <+33>: jl 0x86abf23 <ff_deblock_v_luma_intra_8_sse2.end>
0x086abb67 <+39>: neg %esi
0x086abb69 <+41>: dec %ebx
0x086abb6a <+42>: jl 0x86abf23 <ff_deblock_v_luma_intra_8_sse2.end>
0x086abb70 <+48>: add %eax,%esi
=> 0x086abb72 <+50>: movdqa (%esi,%ecx,2),%xmm0
0x086abb77 <+55>: movdqa (%esi,%edi,1),%xmm1
0x086abb7c <+60>: movdqa (%eax),%xmm2
(gdb) info reg
eax 0xbfbfc888 -1077950328
ecx 0x10 16
edx 0x4 4
ebx 0x1 1
esp 0xbfbfc7c8 0xbfbfc7c8
ebp 0xbfbfc9b8 0xbfbfc9b8
esi 0xbfbfc848 -1077950392
edi 0x30 48
eip 0x86abb72 0x86abb72 <ff_deblock_v_luma_intra_8_sse2+50>
eflags 0x10287 [ CF PF SF IF RF ]
cs 0x1b 27
ss 0x1f 31
ds 0x1f 31
es 0x1f 31
fs *value not available*
gs *value not available*
Something allocates unaligned buffer somewhere.
Since this comes from bundled ffmpeg, other software utilising ffmpeg may be affected.
>Fix:
Please!
>Release-Note:
>Audit-Trail:
From: "John D. Baker" <jdbaker@mylinuxisp.com>
To: gnats-bugs@NetBSD.org
Cc:
Subject: Re: pkg/47132: MPlayer crashes (VLC is affected potentially too)
Date: Wed, 28 Nov 2012 13:17:34 -0600 (CST)
Date: Wed, 28 Nov 2012 13:14:14 -0600 (CST)
From: John D. Baker <jdbaker@david.technoskunk.fur>
To: pkgsrc-users@NetBSD.org
Subject: Re: pkg/47132: MPlayer crashes (VLC is affected potentially too)
This PR seems to coincide with the timeframe at which I've observed this
as well, although slightly different.
So far, non-mp4 file formats seem to work ok (MPEG1/2, quicktime, avi).
Only a couple of "mp4" files in my collection don't cause mplayer to
crash as shown below.
So far, mplayer built on 6.0_STABLE/amd64 and 6.99.15/amd64 work fine.
I've not had a chance yet to try it on 6.99.15/i386, 5.2_RC1/i386 or
other architectures. The one 6.0_STABLE/i386 system where it works
properly was one just upgraded from 5.1_STABLE with a clean build of
the release (with the correct libssl version/links).
----------
MPlayer 1.1-4.5.3 (C) 2000-2012 MPlayer Team
192 audio & 400 video codecs
libavformat version 54.6.101 (internal)
libavformat file format detected.
[lavf] stream 0: video (h264), -vid 0
[lavf] stream 1: audio (aac), -aid 0, -alang und
VIDEO: [H264] 640x360 24bpp 29.970 fps 588.0 kbps (71.8 kbyte/s)
Clip info:
major_brand: mp42
minor_version: 0
compatible_brands: isommp42
creation_time: 2011-05-25 21:25:55
Load subtitles in Movies/
[VO_XV] It seems there is no Xvideo support for your video card available.
[VO_XV] Run 'xvinfo' to verify its Xv support and read
[VO_XV] DOCS/HTML/en/video.html#xv!
[VO_XV] See 'mplayer -vo help' for other (non-xv) video out drivers.
[VO_XV] Try -vo x11.
==========================================================================
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
libavcodec version 54.23.100 (internal)
Selected video codec: [ffh264] vfm: ffmpeg (FFmpeg H.264)
==========================================================================
==========================================================================
Opening audio decoder: [ffmpeg] FFmpeg/libavcodec audio decoders
AUDIO: 44100 Hz, 2 ch, s16le, 95.9 kbit/6.80% (ratio: 11993->176400)
Selected audio codec: [ffaac] afm: ffmpeg (FFmpeg AAC (MPEG-2/MPEG-4 Audio))
==========================================================================
AO: [oss] 44100Hz 2ch s16le (2 bytes per sample)
Starting playback...
Unsupported PixelFormat 61
Unsupported PixelFormat 53
Unsupported PixelFormat 81
MPlayer interrupted by signal 11 in module: decode video
- MPlayer crashed by bad usage of CPU/FPU/RAM.
Recompile MPlayer with --enable-debug and make a 'gdb' backtrace and
disassembly. Details in DOCS/HTML/en/bugreports_what.html#bugreports_crash.
- MPlayer crashed. This shouldn't happen.
It can be a bug in the MPlayer code _or_ in your drivers _or_ in your
gcc version. If you think it's MPlayer's fault, please read
DOCS/HTML/en/bugreports.html and follow the instructions there. We can't and
won't help unless you provide this information when reporting a possible
bug.
----------
I've gone so far as to completely wipe out all of my additional packages
on two of the build systems and rebuild/update the OS from scratch as
well as rebuild all packages leading up to "multimedia/mplayer" and the
result has always been the same.
I added "PKG_OPTIONS.mplayer+=debug" to my "/etc/mk.conf" file, but
with that option enabled the build phase eventually fails, claiming:
[...]
gcc -MD -MP -Wundef -W -Wall -Wstrict-prototypes -Wmissing-prototypes
-Wdisabled-optimization -Wno-pointer-sign -Wdeclaration-after-statement
-std=gnu99 -O2 -march=i486 -mtune=generic -pipe -g -fno-tree-vectorize
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -I. -Iffmpeg
-I/usr/pkg/include -I/usr/include -I/usr/pkg/include/faad2
-I/usr/X11R7/include -I/usr/X11R7/include/freetype2 -D_THREAD_SAFE
-I/usr/X11R7/include -I/usr/pkg/include -D_REENTRANT -I/usr/pkg/include
-I/usr/X11R7/include/freetype2 -I/usr/X11R7/include -I/usr/pkg/include
-I/usr/pkg/include/libdvdread -c -o stream/stream_cdda.o stream/stream_cdda.c
stream/stream_cdda.c:21:28: fatal error: cdda_interface.h: No such file or
directory
compilation terminated.
gmake: *** [stream/stream_cdda.o] Error 1
*** Error code 2
Stop.
make: stopped in /d0/nbsd/pkgsrc/multimedia/mplayer
*** Error code 1
Stop.
The build failure appears on both i386 and amd64 platforms (others?)
when using the "debug" option.
--
|/"\ John D. Baker, KN5UKS NetBSD Darwin/MacOS X
|\ / jdbaker[snail]mylinuxisp[flyspeck]com OpenBSD FreeBSD
| X No HTML/proprietary data in email. BSD just sits there and works!
|/ \ GPGkeyID: D703 4A7E 479F 63F8 D3F4 BD99 9572 8F23 E4AD 1645
From: "John D. Baker" <jdbaker@mylinuxisp.com>
To: gnats-bugs@NetBSD.org
Cc:
Subject: Re: pkg/47132: MPlayer crashes (VLC is affected potentially too)
Date: Thu, 29 Nov 2012 11:13:23 -0600 (CST)
I built "multimedia/vlc" (1.1.13) and it was able to play all the
media files that caused mplayer to crash. vlc segfaults on exit though
it's qt4-related, rather than av-codec-related. (I should note that when
mplayer crashes, it doesn't leave a core file behind).
Then I built "multimedia/vlc2" (2.0.3 in pkgsrc-2012Q3) and it dies with
a segfault as follows:
Core was generated by `vlc'.
Program terminated with signal 11, Segmentation fault.
#0 0xb7759f72 in ff_deblock_v_luma_8_sse2 ()
from /usr/pkg/lib/libavcodec.so.52
(gdb) bt
#0 0xb7759f72 in ff_deblock_v_luma_8_sse2 ()
from /usr/pkg/lib/libavcodec.so.52
#1 0xbab29328 in operator new(unsigned int) () from /usr/lib/libstdc++.so.7
#2 0xb75c865e in filter_mb_dir.clone.0.clone.1 ()
from /usr/pkg/lib/libavcodec.so.52
#3 0xb75c901c in ff_h264_filter_mb () from /usr/pkg/lib/libavcodec.so.52
#4 0xb75c9890 in ff_h264_filter_mb_fast () from /usr/pkg/lib/libavcodec.so.52
#5 0xb75ad1a8 in loop_filter () from /usr/pkg/lib/libavcodec.so.52
#6 0xb75b6597 in decode_slice () from /usr/pkg/lib/libavcodec.so.52
#7 0xb75b6aec in execute_decode_slices () from /usr/pkg/lib/libavcodec.so.52
#8 0xb75b9d2f in decode_nal_units () from /usr/pkg/lib/libavcodec.so.52
#9 0xb75ba3e8 in decode_frame () from /usr/pkg/lib/libavcodec.so.52
#10 0xb76eaaa9 in avcodec_decode_video2 () from /usr/pkg/lib/libavcodec.so.52
#11 0xba39b5e0 in ?? ()
from /usr/pkg/lib/vlc/plugins/codec/libavcodec_plugin.so
#12 0x0000001c in ?? ()
#13 0xbbbbf57a in ?? () from /usr/pkg/lib/libvlccore.so.5
Backtrace stopped: previous frame inner to this frame (corrupt stack?)
I will try building with PKG_OPTIONS.vlc2+=debug to see if there's more
information to be had.
--
|/"\ John D. Baker, KN5UKS NetBSD Darwin/MacOS X
|\ / jdbaker[snail]mylinuxisp[flyspeck]com OpenBSD FreeBSD
| X No HTML/proprietary data in email. BSD just sits there and works!
|/ \ GPGkeyID: D703 4A7E 479F 63F8 D3F4 BD99 9572 8F23 E4AD 1645
From: "John D. Baker" <jdbaker@mylinuxisp.com>
To: gnats-bugs@NetBSD.org
Cc:
Subject: Re: pkg/47132: MPlayer crashes (VLC is affected potentially too)
Date: Thu, 29 Nov 2012 12:05:28 -0600 (CST)
A similar problem from "wip/electricsheep-svn". Again, no problem on
amd64, but crashing on i386 (6.0_STABLE).
Core was generated by `electricsheep'.
Program terminated with signal 11, Segmentation fault.
#0 0xbb466f72 in ff_deblock_v_luma_8_sse2 ()
from /usr/pkg/lib/libavcodec.so.52
(gdb) bt
#0 0xbb466f72 in ff_deblock_v_luma_8_sse2 ()
from /usr/pkg/lib/libavcodec.so.52
#1 0xbfbfcd94 in ?? ()
#2 0xbb2d565e in filter_mb_dir.clone.0.clone.1 ()
from /usr/pkg/lib/libavcodec.so.52
#3 0xbb2d601c in ff_h264_filter_mb () from /usr/pkg/lib/libavcodec.so.52
#4 0xbb2d6890 in ff_h264_filter_mb_fast () from /usr/pkg/lib/libavcodec.so.52
#5 0xbb2ba1a8 in loop_filter () from /usr/pkg/lib/libavcodec.so.52
#6 0xbb2c36a3 in decode_slice () from /usr/pkg/lib/libavcodec.so.52
#7 0xbb2c3aec in execute_decode_slices () from /usr/pkg/lib/libavcodec.so.52
#8 0xbb2c6d2f in decode_nal_units () from /usr/pkg/lib/libavcodec.so.52
#9 0xbb2c73e8 in decode_frame () from /usr/pkg/lib/libavcodec.so.52
#10 0xbb3f7aa9 in avcodec_decode_video2 () from /usr/pkg/lib/libavcodec.so.52
#11 0xbbbb922d in avformat_find_stream_info ()
from /usr/pkg/lib/libavformat.so.52
#12 0xbbbb9f4c in av_find_stream_info () from /usr/pkg/lib/libavformat.so.52
#13 0x0804bfe1 in ?? ()
#14 0x0804d095 in ?? ()
#15 0x0804ef7f in ?? ()
#16 0x0805021a in ?? ()
#17 0x0804a0f5 in ?? ()
#18 0x08049fc8 in ?? ()
Backtrace stopped: Not enough registers or memory available to unwind further
--
|/"\ John D. Baker, KN5UKS NetBSD Darwin/MacOS X
|\ / jdbaker[snail]mylinuxisp[flyspeck]com OpenBSD FreeBSD
| X No HTML/proprietary data in email. BSD just sits there and works!
|/ \ GPGkeyID: D703 4A7E 479F 63F8 D3F4 BD99 9572 8F23 E4AD 1645
From: Joerg Sonnenberger <joerg@britannica.bec.de>
To: gnats-bugs@NetBSD.org
Cc:
Subject: Re: pkg/47132: MPlayer crashes (VLC is affected potentially too)
Date: Thu, 29 Nov 2012 19:14:19 +0100
On Thu, Nov 29, 2012 at 06:10:05PM +0000, John D. Baker wrote:
> A similar problem from "wip/electricsheep-svn". Again, no problem on
> amd64, but crashing on i386 (6.0_STABLE).
The SSE2 code is making invalid assumptions about the stack alignment.
It is written in some fancy form of pseudo-assembler or so, so I didn't
find an obvious way to fix it.
Joerg
From: "John D. Baker" <jdbaker@mylinuxisp.com>
To: gnats-bugs@NetBSD.org
Cc:
Subject: Re: pkg/47132: MPlayer crashes (VLC is affected potentially too)
Date: Thu, 29 Nov 2012 14:02:00 -0600 (CST)
I rebuilt "multimedia/vlc2" with the "debug" option. (Actually, I turned
on ALL the options (so PKG_OPTIONS matched PKG_SUPPORTED_OPTIONS). Upon
trying to play a file, the following was displayed on the terminal:
VLC media player 2.0.3 Twoflower (revision 2.0.2-93-g77aa89e)
[0xbb80d0d4] main libvlc: Running vlc with the default interface. Use 'cvlc' to use vlc without interface.
[0xbb829c04] qt4 interface error: Unable to load extensions module
[0xbb8d5714] xcb_xv vout display error: no available XVideo adaptor
failed to create drawable
[0xb8f96c24] pulse audio output error: PulseAudio server connection failure: Connection refused
The player window eventually opened, but then closed almost immediately
and 'vlc' exited. It DID NOT leave a core file behind.
Attempting to run vlc under gdb directly never seemed to progress any and
could only be killed with -9.
--
|/"\ John D. Baker, KN5UKS NetBSD Darwin/MacOS X
|\ / jdbaker[snail]mylinuxisp[flyspeck]com OpenBSD FreeBSD
| X No HTML/proprietary data in email. BSD just sits there and works!
|/ \ GPGkeyID: D703 4A7E 479F 63F8 D3F4 BD99 9572 8F23 E4AD 1645
From: Joerg Sonnenberger <joerg@britannica.bec.de>
To: gnats-bugs@NetBSD.org
Cc:
Subject: Re: pkg/47132: MPlayer crashes (VLC is affected potentially too)
Date: Sat, 1 Dec 2012 01:17:48 +0100
Can you please try force the code to compile with -mstackrealign
-mpreferrred-stack-boundary=4? I'm not sure if adding it to CFLAGS is
good enough. _WRAP_EXTRA_ARGS.CC might be a good try as well.
Joerg
From: "John D. Baker" <jdbaker@mylinuxisp.com>
To: gnats-bugs@NetBSD.org
Cc:
Subject: Re: pkg/47132: MPlayer crashes (VLC is affected potentially too)
Date: Mon, 3 Dec 2012 17:17:26 -0600 (CST)
As suggested, adding the following to "/etc/mk.conf":
.if "${PKGPATH}" == "multimedia/mplayer"
CFLAGS+= -mstackrealign -mpreferred-stack-boundary=4
.endif
and rebuilding produces a working 'mplayer' executable on i386.
I'm also building "multimedia/vlc2" with this, but I expect to also have
to rebuild "multimedia/ffmpeg" with these additional flags as well.
--
|/"\ John D. Baker, KN5UKS NetBSD Darwin/MacOS X
|\ / jdbaker[snail]mylinuxisp[flyspeck]com OpenBSD FreeBSD
| X No HTML/proprietary data in email. BSD just sits there and works!
|/ \ GPGkeyID: D703 4A7E 479F 63F8 D3F4 BD99 9572 8F23 E4AD 1645
From: Joerg Sonnenberger <joerg@britannica.bec.de>
To: gnats-bugs@NetBSD.org
Cc:
Subject: Re: pkg/47132: MPlayer crashes (VLC is affected potentially too)
Date: Tue, 4 Dec 2012 00:42:26 +0100
On Mon, Dec 03, 2012 at 11:20:04PM +0000, John D. Baker wrote:
> I'm also building "multimedia/vlc2" with this, but I expect to also have
> to rebuild "multimedia/ffmpeg" with these additional flags as well.
ffmpeg should be good enough, vlc2 itself doesn't have nasty assembler
AFAICR.
Joerg
From: "John D. Baker" <jdbaker@mylinuxisp.com>
To: gnats-bugs@NetBSD.org
Cc:
Subject: Re: pkg/47132: MPlayer crashes (VLC is affected potentially too)
Date: Mon, 3 Dec 2012 18:29:31 -0600 (CST)
I've now rebuilt "multimedia/ffmpeg" with the following in "/etc/mk.conf":
.if "${PKGPATH}" == "multimedia/mplayer" || \
"${PKGPATH}" == "multimedia/ffmpeg"
CFLAGS+= -mstackrealign -mpreferred-stack-boundary=4
.endif
allowing "wip/electricsheep-svn" to work on i386 again.
Rebuilding "multimedia/vlc2" (w/o the above additional flags) is in
progress.
--
|/"\ John D. Baker, KN5UKS NetBSD Darwin/MacOS X
|\ / jdbaker[snail]mylinuxisp[flyspeck]com OpenBSD FreeBSD
| X No HTML/proprietary data in email. BSD just sits there and works!
|/ \ GPGkeyID: D703 4A7E 479F 63F8 D3F4 BD99 9572 8F23 E4AD 1645
From: "John D. Baker" <jdbaker@mylinuxisp.com>
To: gnats-bugs@NetBSD.org
Cc:
Subject: Re: pkg/47132: MPlayer crashes (VLC is affected potentially too)
Date: Tue, 4 Dec 2012 10:14:26 -0600 (CST)
With "multimedia/ffmpeg" built with the stack-realignment options and
building "multimedia/vlc2" with default options plus "debug", the
resulting 'vlc' executable doesn't crash, but neither does it display
any video from the media files I used to test (which play properly with
'mplayer'). Audio plays OK, though.
--
|/"\ John D. Baker, KN5UKS NetBSD Darwin/MacOS X
|\ / jdbaker[snail]mylinuxisp[flyspeck]com OpenBSD FreeBSD
| X No HTML/proprietary data in email. BSD just sits there and works!
|/ \ GPGkeyID: D703 4A7E 479F 63F8 D3F4 BD99 9572 8F23 E4AD 1645
From: Onno van der Linden <o.vd.linden@quicknet.nl>
To: gnats-bugs@netbsd.org
Cc:
Subject: Re: pkg/47132
Date: Sun, 7 Apr 2013 13:01:45 +0200
Did some building and testing on i386
Starting with gcc 4.6 the options
-mstackrealign -mpreferred-stack-boundary=4
aren't necessary anymore for ffmpeg and mplayer
to work on i386.
The stackrealign options are only available from
gcc 4.2 onward. It looks to me like
GCC_REQD >= 4.2 in combination with setting
the two -m options if gcc 4.[2345] is being used
on i386 in the ffmpeg and mplayer
makefiles is a possible fix.
Onno
From: Onno van der Linden <o.vd.linden@quicknet.nl>
To: gnats-bugs@netbsd.org
Cc:
Subject: Re: pkg/47132
Date: Sat, 29 Jun 2013 15:22:22 +0200
Here are two diffs that should fix the
stack alignment issues for mplayer and
ffmpeg on i386. The two alignment options
needed for gcc are available since 4.2.
They're not necessary anymore with 4.6
and later.
The ffmpeg diff disables asm completely
for non-gcc on i386 instead of the
original Darwin and SunOS check.
I'm not sure if that's the right
thing to do though. Maybe the
empty(CC_VERSION:Mgcc*) check should
be removed and if needed additional
checks for non-gcc i386 compilers
should be added.
The mplayer diff uses the --yasm=''
configure option to disable asm for
gcc < 4.2.
Onno
--- /usr/pkgsrc/multimedia/ffmpeg/Makefile.orig 2013-06-29 09:21:58.000000000 +0200
+++ /usr/pkgsrc/multimedia/ffmpeg/Makefile 2013-06-29 12:06:36.000000000 +0200
@@ -17,11 +17,6 @@
.include "../../mk/bsd.prefs.mk"
-.if !empty(MACHINE_PLATFORM:MDarwin-*-i386) \
- || !empty(MACHINE_PLATFORM:MSunOS-*-i386)
-CONFIGURE_ARGS+= --disable-asm
-.endif
-
.if !empty(USE_CROSS_COMPILE:M[yY][eE][sS])
CONFIGURE_ARGS+= --enable-cross-compile
CONFIGURE_ARGS+= --target-os=${LOWER_OPSYS:Q}
@@ -42,6 +37,19 @@
.include "../../mk/compiler.mk"
+# disable asm on i386 for non-gcc and gcc < 4.2
+# no alignment options needed for gcc >= 4.6 on i386
+
+.if ${MACHINE_ARCH} == "i386"
+.if !empty(CC_VERSION:Mgcc-4.[2345]*)
+CFLAGS+=-mstackrealign -mpreferred-stack-boundary=4
+.elif !empty(CC_VERSION:Mgcc-[123]*) \
+ || !empty(CC_VERSION:Mgcc-4.[01]*) \
+ || empty(CC_VERSION:Mgcc*)
+CONFIGURE_ARGS+= --disable-asm
+.endif
+.endif
+
.if !empty(PKGSRC_COMPILER:Mclang)
CFLAGS+= -no-integrated-as
.endif
--- /usr/pkgsrc/multimedia/mplayer-share/Makefile.cflags.orig 2013-06-29 13:45:14.000000000 +0200
+++ /usr/pkgsrc/multimedia/mplayer-share/Makefile.cflags 2013-06-29 15:02:47.000000000 +0200
@@ -13,6 +13,16 @@
. include "../../mk/compiler.mk"
+# alignment flags for builtin ffmpeg
+# --yasm='' disables asm altogether for gcc < 4.2
+
+. if !empty(CC_VERSION:Mgcc-4.[2345]*)
+CFLAGS+=-mstackrealign -mpreferred-stack-boundary=4
+. elif !empty(CC_VERSION:Mgcc-[123]*) || \
+ !empty(CC_VERSION:Mgcc-4.[01]*)
+CONFIGURE_ARGS+= --yasm=''
+. endif
+
. if !empty(CC_VERSION:Mgcc-4*)
CFLAGS+= -O3 -ffast-math -fomit-frame-pointer -mtune=pentiumpro
. else
From: "Thomas Klausner" <wiz@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/47132 CVS commit: pkgsrc/multimedia/ffmpeg
Date: Sat, 29 Jun 2013 13:34:23 +0000
Module Name: pkgsrc
Committed By: wiz
Date: Sat Jun 29 13:34:23 UTC 2013
Modified Files:
pkgsrc/multimedia/ffmpeg: Makefile
Log Message:
Fix stack alignment issues on i386.
From Onno van der Linden in PR 47132.
To generate a diff of this commit:
cvs rdiff -u -r1.109 -r1.110 pkgsrc/multimedia/ffmpeg/Makefile
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
State-Changed-From-To: open->feedback
State-Changed-By: wiz@NetBSD.org
State-Changed-When: Sat, 29 Jun 2013 13:35:40 +0000
State-Changed-Why:
I've committed Onno's patches. Did they fix your problem?
From: "Thomas Klausner" <wiz@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/47132 CVS commit: pkgsrc/multimedia/mplayer-share
Date: Sat, 29 Jun 2013 13:35:05 +0000
Module Name: pkgsrc
Committed By: wiz
Date: Sat Jun 29 13:35:04 UTC 2013
Modified Files:
pkgsrc/multimedia/mplayer-share: Makefile.cflags
Log Message:
Fix stack alignment issues on i386.
From Onno van der Linden in PR 47132.
To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 pkgsrc/multimedia/mplayer-share/Makefile.cflags
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
From: "John D. Baker" <jdbaker@mylinuxisp.com>
To: gnats-bugs@NetBSD.org
Cc:
Subject: Re: pkg/47132: MPlayer crashes (VLC is affected potentially too)
Date: Sun, 30 Jun 2013 06:07:58 -0500 (CDT)
Since this PR was originally opened, "multimedia/ffmpeg" was updated.
The old version is retained as "multimedia/ffmpeg010" and requires these
patches as well.
If there are any "*mplayer*" or "*mencoder*" variants that do not use
"multimedia/mplayer-share", they will need these patches too, since they
tend to build their own private copy of the "ffmpeg" libraries.
--
|/"\ John D. Baker, KN5UKS NetBSD Darwin/MacOS X
|\ / jdbaker[snail]mylinuxisp[flyspeck]com OpenBSD FreeBSD
| X No HTML/proprietary data in email. BSD just sits there and works!
|/ \ GPGkeyID: D703 4A7E 479F 63F8 D3F4 BD99 9572 8F23 E4AD 1645
From: "Thomas Klausner" <wiz@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/47132 CVS commit: pkgsrc/multimedia/ffmpeg010
Date: Sun, 30 Jun 2013 12:16:18 +0000
Module Name: pkgsrc
Committed By: wiz
Date: Sun Jun 30 12:16:18 UTC 2013
Modified Files:
pkgsrc/multimedia/ffmpeg010: Makefile
Log Message:
Apply a version of the asm fixes for gcc from ffmpeg/Makefile here as well.
Noted by John D. Baker in PR 47132.
To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 pkgsrc/multimedia/ffmpeg010/Makefile
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
From: Thomas Klausner <wiz@NetBSD.org>
To: NetBSD bugtracking <gnats-bugs@NetBSD.org>
Cc:
Subject: Re: pkg/47132: MPlayer crashes (VLC is affected potentially too)
Date: Sun, 30 Jun 2013 14:16:46 +0200
On Sun, Jun 30, 2013 at 12:10:00PM +0000, John D. Baker wrote:
> Since this PR was originally opened, "multimedia/ffmpeg" was updated.
> The old version is retained as "multimedia/ffmpeg010" and requires these
> patches as well.
Added. Please test.
> If there are any "*mplayer*" or "*mencoder*" variants that do not use
> "multimedia/mplayer-share", they will need these patches too, since they
> tend to build their own private copy of the "ffmpeg" libraries.
AFAIK all mplayer packages use mplayer-share.
Thanks,
Thomas
From: "John D. Baker" <jdbaker@mylinuxisp.com>
To: gnats-bugs@NetBSD.org
Cc:
Subject: Re: pkg/47132: MPlayer crashes (VLC is affected potentially too)
Date: Tue, 2 Jul 2013 21:37:55 -0500 (CDT)
On Sun, 30 Jun 2013 12:20:01 +0000 (UTC), Thomas Klausner wrote:
> On Sun, Jun 30, 2013 at 12:10:00PM +0000, John D. Baker wrote:
>> Since this PR was originally opened, "multimedia/ffmpeg" was updated.
>> The old version is retained as "multimedia/ffmpeg010" and requires these
>> patches as well.
>
> Added. Please test.
>
>> If there are any "*mplayer*" or "*mencoder*" variants that do not use
>> "multimedia/mplayer-share", they will need these patches too, since they
>> tend to build their own private copy of the "ffmpeg" libraries.
>
> AFAIK all mplayer packages use mplayer-share.
I commented out the portion of my "/etc/mk.conf" that added these compiler
directives and rebuilt the affected packages. All appear to work fine.
Thanks.
--
|/"\ John D. Baker, KN5UKS NetBSD Darwin/MacOS X
|\ / jdbaker[snail]mylinuxisp[flyspeck]com OpenBSD FreeBSD
| X No HTML/proprietary data in email. BSD just sits there and works!
|/ \ GPGkeyID: D703 4A7E 479F 63F8 D3F4 BD99 9572 8F23 E4AD 1645
State-Changed-From-To: feedback->closed
State-Changed-By: dholland@NetBSD.org
State-Changed-When: Wed, 03 Jul 2013 17:45:10 +0000
State-Changed-Why:
Confirmed fixed, thanks.
From: "John D. Baker" <jdbaker@mylinuxisp.com>
To: gnats-bugs@NetBSD.org
Cc:
Subject: Re: pkg/47132 (MPlayer crashes (VLC is affected potentially too))
Date: Wed, 13 Aug 2014 23:26:58 -0500 (CDT)
Despite claims that GCC >=4.6 does not require the stack-realignment
options on i386, mplayer built on -7 and -current i386 (GCC 4.8.3)
crashes in the same fashion as before.
NetBSD slab.technoskunk.fur 7.99.1 NetBSD 7.99.1 (SLAB) #1: Wed Aug 13 12:15:59 CDT 2014 sysop@verthandi.technoskunk.fur:/d0/build/current/obj/i386/sys/arch/i386/compile/SLAB i386
Taking a cue from pkg/48680, the following patch produces a working mplayer
on -7/-current i386:
+Index: multimedia/mplayer-share/Makefile.cflags
+===================================================================
+RCS file: /cvsroot/pkgsrc/multimedia/mplayer-share/Makefile.cflags,v
+retrieving revision 1.6
+diff -u -p -r1.6 Makefile.cflags
+--- multimedia/mplayer-share/Makefile.cflags 29 Jun 2013 13:35:04 -0000 1.6
++++ multimedia/mplayer-share/Makefile.cflags 14 Aug 2014 04:21:00 -0000
+@@ -16,11 +16,11 @@
+ # alignment flags for builtin ffmpeg
+ # --yasm='' disables asm altogether for gcc < 4.2
+
+-. if !empty(CC_VERSION:Mgcc-4.[2345]*)
+-CFLAGS+=-mstackrealign -mpreferred-stack-boundary=4
+-. elif !empty(CC_VERSION:Mgcc-[123]*) || \
+- !empty(CC_VERSION:Mgcc-4.[01]*)
++. if !empty(CC_VERSION:Mgcc-[123]*) || \
++ !empty(CC_VERSION:Mgcc-4.[01].*)
+ CONFIGURE_ARGS+= --yasm=''
++. elif !empty(CC_VERSION:Mgcc-4.*)
++CFLAGS+=-mstackrealign -mpreferred-stack-boundary=4
+ . endif
+
+ . if !empty(CC_VERSION:Mgcc-4*)
--
|/"\ John D. Baker, KN5UKS NetBSD Darwin/MacOS X
|\ / jdbaker[snail]mylinuxisp[flyspeck]com OpenBSD FreeBSD
| X No HTML/proprietary data in email. BSD just sits there and works!
|/ \ GPGkeyID: D703 4A7E 479F 63F8 D3F4 BD99 9572 8F23 E4AD 1645
State-Changed-From-To: closed->open
State-Changed-By: dholland@NetBSD.org
State-Changed-When: Wed, 03 Dec 2014 16:38:33 +0000
State-Changed-Why:
problem has reappeared.
(joerg, please don't bother to reiterate your denial that it exists)
From: Joerg Sonnenberger <joerg@britannica.bec.de>
To: gnats-bugs@NetBSD.org
Cc: pkg-manager@netbsd.org, pkgsrc-bugs@netbsd.org, gnats-admin@netbsd.org,
dholland@NetBSD.org, asau@inbox.ru
Subject: Re: pkg/47132 (MPlayer crashes (VLC is affected potentially too))
Date: Wed, 3 Dec 2014 18:40:43 +0100
On Wed, Dec 03, 2014 at 04:38:33PM +0000, dholland@NetBSD.org wrote:
> State-Changed-Why:
> problem has reappeared.
> (joerg, please don't bother to reiterate your denial that it exists)
You might be confusing something. I only ever stated that the problem is
the broken pseudo-assembler...
Joerg
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2014
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.