pkgsrc-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: pkg/53369: audio/mpg321 coredumps with SIGSEGV



The following reply was made to PR pkg/53369; it has been noted by GNATS.

From: Leonardo Taccari <leot%NetBSD.org@localhost>
To: gnats-bugs%NetBSD.org@localhost
Cc: 
Subject: Re: pkg/53369: audio/mpg321 coredumps with SIGSEGV
Date: Sat, 16 Jun 2018 12:43:20 +0200

 Hello Sevan!
 
 venture37%geeklan.co.uk@localhost writes:
 > >Number:         53369
 > >Category:       pkg
 > >Synopsis:       audio/mpg321 coredumps with SIGSEGV
 > >Confidential:   no
 > >Severity:       serious
 > >Priority:       medium
 > >Responsible:    pkg-manager
 > >State:          open
 > >Class:          sw-bug
 > >Submitter-Id:   net
 > >Arrival-Date:   Fri Jun 15 19:15:00 +0000 2018
 > >Originator:     Sevan Janiyan
 > >Release:        pkgsrc-current
 > >Organization:
 > >Environment:
 > NetBSD 8.0_RC1 macppc powerpc
 >
 > >Description:
 > Attempting to play a .wav or .mp3 file with mpg321 results in a coredump=
 , sometimes just executing mpg321 without any options also coredumps.
 > [...]
 
 As pointed out by <maya> it seems that there is a sem_post() on a
 not initialized semaphore.
 
 The following patch seems to fix the problem (if I am not missing
 something there is no need to call sem_post() at all in that case and can
 be removed):
 
  <https://www.NetBSD.org/~leot/pkgsrc-patches/mpg321-pkg-53369.patch>
 
 Please let us known if that fixes the problem!
 
 
 For completeness here the patch also inline.
 
 ---------------------- 8< ------------------- 8< ----------------------
 mpg321: Do not unlock unititialized main_lock
 
 Do not call sem_post() on an unitialized semaphore.
 
 Problem spotted by <maya>.
 
 Should fix PR pkg/53369 by <sevan>.
 
 Index: Makefile
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
 RCS file: /cvsroot/pkgsrc/audio/mpg321/Makefile,v
 retrieving revision 1.19
 diff -u -p -r1.19 Makefile
 --- Makefile	2 Jun 2016 09:18:19 -0000	1.19
 +++ Makefile	16 Jun 2018 10:34:29 -0000
 @@ -2,6 +2,7 @@
  =
 
  DISTNAME=3D	mpg321_0.3.2.orig
  PKGNAME=3D	${DISTNAME:S/_/-/:S/.orig//}
 +PKGREVISION=3D	1
  CATEGORIES=3D	audio
  MASTER_SITES=3D	${MASTER_SITE_SOURCEFORGE:=3Dmpg321/}
  =
 
 Index: distinfo
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
 RCS file: /cvsroot/pkgsrc/audio/mpg321/distinfo,v
 retrieving revision 1.8
 diff -u -p -r1.8 distinfo
 --- distinfo	2 Jun 2016 09:18:19 -0000	1.8
 +++ distinfo	16 Jun 2018 10:34:29 -0000
 @@ -5,4 +5,4 @@ RMD160 (mpg321_0.3.2.orig.tar.gz) =3D 04ea
  SHA512 (mpg321_0.3.2.orig.tar.gz) =3D f1bead2c11e4cde0f1a87e1b2e3d216ef80=
 c9a5dd8b219841961688d44a5fc63a54b7af07359766fde0b2712ddc5d0a90b20149c3228c=
 b2d70e830e15c8ab234
  Size (mpg321_0.3.2.orig.tar.gz) =3D 151139 bytes
  SHA1 (patch-ao.c) =3D cb404acdfb032c5a823c717965d14319db0d4466
 -SHA1 (patch-mpg321.c) =3D 0f82c72976ce1f1e7d16cd972eb1e38a0e305f86
 +SHA1 (patch-mpg321.c) =3D c874219aa316899af42d5984ca06860642260d4b
 Index: patches/patch-mpg321.c
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
 RCS file: /cvsroot/pkgsrc/audio/mpg321/patches/patch-mpg321.c,v
 retrieving revision 1.1
 diff -u -p -r1.1 patch-mpg321.c
 --- patches/patch-mpg321.c	2 Jun 2016 09:18:19 -0000	1.1
 +++ patches/patch-mpg321.c	16 Jun 2018 10:34:29 -0000
 @@ -1,6 +1,7 @@
  $NetBSD: patch-mpg321.c,v 1.1 2016/06/02 09:18:19 jperkin Exp $
  =
 
 -Ensure structs are zero'd before use.
 +- Ensure structs are zero'd before use.
 +- Do not unlock uninitialized main_lock
  =
 
  --- mpg321.c.orig	2012-03-25 12:27:49.000000000 +0000
  +++ mpg321.c
 @@ -12,3 +13,12 @@ Ensure structs are zero'd before use.
       playbuf.pl =3D pl =3D new_playlist();
   =
 
       if (!pl)
 +@@ -750,8 +751,6 @@ int main(int argc, char *argv[])
 + 	    	    if (tcgetattr(0, &terminal_settings) < 0)
 + 	    		    perror("tcgetattr()");
 + 	    	    memcpy(&old_terminal_settings, &terminal_settings, sizeof(stru=
 ct termios));
 +-		    /* Early thread start */
 +-		    sem_post(&main_lock);
 + 	    }
 +     }
 +     /* Play the mpeg files or zip it! */
 


Home | Main Index | Thread Index | Old Index