[MPlayer-dev-eng] [PATCH] configure & MEMALIGN_HACK
saschasommer at freenet.de
Tue Jan 4 23:04:34 CET 2005
On Tuesday 04 January 2005 21:10, Björn Sandell wrote:
> A while a go there was a commit to configure:
> $ cvs diff -ur1.942 -r1.943 configure
> Index: configure
> RCS file: /cvsroot/mplayer/main/configure,v
> retrieving revision 1.942
> retrieving revision 1.943
> diff -u -r1.942 -r1.943
> --- configure 25 Nov 2004 21:47:58 -0000 1.942
> +++ configure 15 Dec 2004 14:37:27 -0000 1.943
> @@ -6844,6 +6844,7 @@
> #ifndef HAVE_MEMALIGN
> # define memalign(a,b) malloc(b)
> +#define MEMALIGN_HACK 1
> with the log message
> "enable memalign hack for libavcodec when memalign is not present,
> hopefully the mencoder segfaults on mingw are gone now"
> Unfortunately this does evil thing on OpenBSD (and possibly other BSDs
> as well):
> mplayer in free(): error: modified (chunk-) pointer
> MPlayer interrupted by signal 6 in module: uninit_vcodec
> - 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.
> hence I suggest a patch like the attached.
Can you find out why this happens or send a backtrace?
Do the BSDs really have no memalign?
I'm afraid this fix is needed on BSD, too otherwise SSE instructions will just
lead to a segfault on P4 if the buffers aren't aligned correctly.
More information about the MPlayer-dev-eng