From owner-freebsd-toolchain@FreeBSD.ORG Tue Jan 22 17:15:58 2013 Return-Path: Delivered-To: freebsd-toolchain@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 02A527B9; Tue, 22 Jan 2013 17:15:58 +0000 (UTC) (envelope-from jbeich@tormail.org) Received: from outgoing.tormail.org (outgoing.tormail.org [82.221.96.22]) by mx1.freebsd.org (Postfix) with ESMTP id B6AD66F8; Tue, 22 Jan 2013 17:15:57 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=internal.tormail.org) by outgoing.tormail.org with esmtp (Exim 4.72) (envelope-from ) id 1TxhRt-000094-LG; Tue, 22 Jan 2013 20:15:49 +0300 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tormail.org; s=tm; h=Message-Id:X-TorMail-User:Content-Type:MIME-Version:References:Date:In-Reply-To:Subject:Cc:To:From; bh=avqOGyNsAxBjpREwfh7RA+Zji/Kjr9KirDLENCSsgx0=; b=scU1cAbN6LbGFYuoj6NotmpGJ2TXUpFLJ3t5qvTfwSZkXy4CiyZ8eM+nEEOnAnF1pZ0QBeJmvmLL7Ff66wVmsN4LhtzmjkYT7tuywCMC7GFp0/M2HmSAuTHABKra8oXunn/NhlnTlWKJ4QLqRJFLAQBUm2/HiEzFO5bval5eF38=; Received: from jbeich by internal.tormail.org with local (Exim 4.63) (envelope-from ) id 1TxhPU-000Hnu-3N; Tue, 22 Jan 2013 17:13:23 +0000 From: Jan Beich To: bug-followup@freebsd.org Subject: Re: ports/170256: audio/mpg123: SIGNAL 10 (SIGBUS) error In-Reply-To: <201207291139.q6TBdKt2011447@red.freebsd.org> (Julien Cigar's message of "Sun, 29 Jul 2012 11:39:20 GMT") Date: Tue, 22 Jan 2013 12:13:44 -0500 References: <201207291139.q6TBdKt2011447@red.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain X-TorMail-User: jbeich Message-Id: <1TxhPU-000Hnu-3N@internal.tormail.org> Cc: freebsd-toolchain@freebsd.org X-BeenThere: freebsd-toolchain@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Maintenance of FreeBSD's integrated toolchain List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Jan 2013 17:15:58 -0000 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 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