From owner-freebsd-ports@FreeBSD.ORG Tue Aug 14 15:25:06 2012 Return-Path: Delivered-To: freebsd-ports@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B26DA106564A; Tue, 14 Aug 2012 15:25:06 +0000 (UTC) (envelope-from rhurlin@gwdg.de) Received: from amailer.gwdg.de (amailer.gwdg.de [134.76.10.18]) by mx1.freebsd.org (Postfix) with ESMTP id 346788FC08; Tue, 14 Aug 2012 15:25:06 +0000 (UTC) Received: from p508c7abc.dip.t-dialin.net ([80.140.122.188] helo=krabat.raven.hur) by mailer.gwdg.de with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.72) (envelope-from ) id 1T1IzM-0000CI-Bo; Tue, 14 Aug 2012 17:25:00 +0200 Message-ID: <502A6DC8.6090705@gwdg.de> Date: Tue, 14 Aug 2012 17:24:56 +0200 From: Rainer Hurling User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:14.0) Gecko/20120727 Thunderbird/14.0 MIME-Version: 1.0 To: Alexander Kabaev References: <20120812143124.GA21414@triton8.kn-bremen.de> <5027E2EA.2070508@gwdg.de> <20120812171133.GA26625@triton8.kn-bremen.de> <5027E471.1020800@gwdg.de> <5028022B.3020005@gwdg.de> <20120812231210.GA35081@triton8.kn-bremen.de> <20120813024135.3501fcee@kan.dyndns.org> <20120813201242.5108f145@ernst.jennejohn.org> <20120813215212.GA72798@triton8.kn-bremen.de> <20120813191852.1daed223@kan.dyndns.org> <20120814113921.GA94259@triton8.kn-bremen.de> In-Reply-To: <20120814113921.GA94259@triton8.kn-bremen.de> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Authenticated: Id:rhurlin X-Spam-Level: - X-Virus-Scanned: (clean) by exiscan+sophie Cc: freebsd-multimedia@FreeBSD.org, Juergen Lock , freebsd-ports@FreeBSD.org, Gary Jennejohn Subject: Re: Another vlc 2.0.3 update (new ffmpeg! :) X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Aug 2012 15:25:06 -0000 On 14.08.2012 13:39 (UTC+2), Juergen Lock wrote: > [Now also posted here:] > > On Mon, Aug 13, 2012 at 07:18:52PM -0400, Alexander Kabaev wrote: >> On Mon, 13 Aug 2012 23:52:12 +0200 >> Juergen Lock wrote: >> >>> On Mon, Aug 13, 2012 at 08:12:42PM +0200, Gary Jennejohn wrote: >>>> On Mon, 13 Aug 2012 02:41:35 -0400 >>>> Alexander Kabaev wrote: >>>> >>>> [snip lots of gdb trace] >>>> >>>>> Please check the use of _SC_GETPW_R_SIZE_MAX in vlcpulse.c. This >>>>> constant is unsupported, so the module tries to allocate a stack >>>>> buffer with negative size, smashing the stack dead. >>>>> >>>> >>>> Seems like a good idea, but I replaced the rather sloppy >>>> buf[sysctl(_SC_GETPW_R_SIZE_MAX)]; >>>> with >>>> buf[2048]; >>>> and vlc still core dumps when trying to generate plugins.dat. >>> >>> Yeah that seems to be a different issue (rtld). >>> Juergen >> >> Please try this patch. >> > Thank you, that fixed both the build crash with the pulseaudio > knob enabled when the old vlc version was still installed as well > as the install crash with the notify knob enabled. :) After svn update of r239253 from head, I built and install 10.0-CURRENT amd64. Now vlc-2.0.3 with pulseaudio and inotify enabled builds and installs out of the box :-) Many thanks! Rainer > Juergen >> -- >> Alexander Kabaev > >> diff --git a/libexec/rtld-elf/rtld.c b/libexec/rtld-elf/rtld.c >> index 95358aa..6f6ac70 100644 >> --- a/libexec/rtld-elf/rtld.c >> +++ b/libexec/rtld-elf/rtld.c >> @@ -1743,6 +1743,27 @@ init_dag(Obj_Entry *root) >> root->dag_inited = true; >> } >> >> +static void >> +process_nodelete(Obj_Entry *root) >> +{ >> + const Objlist_Entry *elm; >> + >> + /* >> + * Walk over object DAG and process every dependent object >> + * that is marked as DF_1_NODELETE. They need to grow own >> + * dag, which should then be ref-ed separately. >> + */ >> + STAILQ_FOREACH(elm, &root->dagmembers, link) { >> + if (elm->obj != NULL && elm->obj->z_nodelete && >> + !elm->obj->ref_nodel) { >> + dbg("obj %s nodelete", elm->obj->path); >> + init_dag(elm->obj); >> + ref_dag(elm->obj); >> + elm->obj->ref_nodel = true; >> + } >> + } >> + root->dag_inited = true; >> +} >> /* >> * Initialize the dynamic linker. The argument is the address at which >> * the dynamic linker has been mapped into memory. The primary task of >> @@ -1932,12 +1953,6 @@ process_needed(Obj_Entry *obj, Needed_Entry *needed, int flags) >> flags & ~RTLD_LO_NOLOAD); >> if (obj1 == NULL && !ld_tracing && (flags & RTLD_LO_FILTEES) == 0) >> return (-1); >> - if (obj1 != NULL && obj1->z_nodelete && !obj1->ref_nodel) { >> - dbg("obj %s nodelete", obj1->path); >> - init_dag(obj1); >> - ref_dag(obj1); >> - obj1->ref_nodel = true; >> - } >> } >> return (0); >> } >> @@ -2833,8 +2848,12 @@ dlopen_object(const char *name, int fd, Obj_Entry *refobj, int lo_flags, >> /* Make list of init functions to call. */ >> initlist_add_objects(obj, &obj->next, &initlist); >> } >> + /* >> + * Process all no_delete objects here, given them own >> + * DAGs to prevent their dependencies from being unloaded. >> + */ >> + process_nodelete(obj); >> } else { >> - >> /* >> * Bump the reference counts for objects on this DAG. If >> * this is the first dlopen() call for the object that was