Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 22 Jan 2013 12:13:44 -0500
From:      Jan Beich <jbeich@tormail.org>
To:        bug-followup@freebsd.org
Cc:        freebsd-toolchain@freebsd.org
Subject:   Re: ports/170256: audio/mpg123: SIGNAL 10 (SIGBUS) error
Message-ID:  <1TxhPU-000Hnu-3N@internal.tormail.org>
In-Reply-To: <201207291139.q6TBdKt2011447@red.freebsd.org> (Julien Cigar's message of "Sun, 29 Jul 2012 11:39:20 GMT")
References:  <201207291139.q6TBdKt2011447@red.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
The bug probably happens with every .mp3 file.

Program received signal SIGBUS, Bus error.
mpg123_strlen () at dct64_x86_64.S:117
117             movaps          (%rcx), %xmm0
(gdb) bt
#0  mpg123_strlen () at dct64_x86_64.S:117
#1  0x000000080085e416 in INT123_synth_1to1_stereo_x86_64 (bandPtr_l=0x801c5a700,
    bandPtr_r=0x801c5b000, fr=0x801c14000) at synth.c:430
#2  0x000000080086b55f in INT123_do_layer3 (fr=0x801c14000) at layer3.c:2028
#3  0x0000000800858c21 in decode_the_frame (fr=0x801c14000) at libmpg123.c:685
#4  0x00000008008595b7 in mpg123_decode_frame (mh=0x801c14000, num=0x624528,
    audio=0x7fffffffda40, bytes=0x7fffffffda30) at libmpg123.c:824
#5  0x000000000040e445 in play_frame () at mpg123.c:661
#6  0x000000000040ff11 in main (sys_argc=2, sys_argv=0x7fffffffdd28)
    at mpg123.c:1140

And this is caused by a broken .align check in configure.ac:

$ echo '.align 3' | clang -c -o /dev/null -x assembler -
$ echo '.align 3' | gcc47 -c -o /dev/null -x assembler -
{standard input}: Assembler messages:
{standard input}:1: Error: alignment not a power of 2
Exit 1
$ echo '.align 3' | as -o /dev/null
{standard input}: Assembler messages:
{standard input}:1: Error: alignment not a power of 2
Exit 1

No clue whose bug is this but here's a workaround.

--- configure.ac~
+++ configure.ac
@@ -838,21 +838,21 @@
 
 dnl ############## Assembler, compiler properties
 
 # based on posting from John Dalgliesh <johnd@defyne.org> on ffmpeg (LGPL) mailing list
 # find if .align arg is power-of-two or not
 asmalign_exp="unknown"
 if test x"$asmalign_exp" = xunknown; then
 	AC_MSG_CHECKING([if .align takes 2-exponent])
 	asmalign_exp="no"
 	echo '.align 3' > conftest.s
-	if $CCAS -c -o conftest.o conftest.s 1>/dev/null 2>&1; then
+	if $AS -c -o conftest.o conftest.s 1>/dev/null 2>&1; then
 		asmalign_exp="yes"
 		AC_MSG_RESULT([yes])
 	else
 		AC_MSG_RESULT([no])
 	fi
 	rm -f conftest.o conftest.s
 fi
 if test x"$asmalign_exp" = xyes; then
 	AC_DEFINE(ASMALIGN_EXP, 1, [ Define if .align takes 3 for alignment of 2^3=8 bytes instead of 8. ])
 fi



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1TxhPU-000Hnu-3N>