On Mon, Apr 18, 2016 at 07:00:35PM +0200, Adam Wolk wrote:
> On Mon, 18 Apr 2016 17:34:28 +0200
> Adam Wolk <adam.w...@tintagel.pl> wrote:
> 
> > On Wed, 30 Mar 2016 17:10:34 +0100
> > Stuart Henderson <s...@spacehopper.org> wrote:
> > 
> > > On 2016/03/30 15:49, Adam Wolk wrote:  
> > > > Roughly I'm interested if anyone else can confirm that they get
> > > > otter crashing on startup by default.    
> > > 
> > > FWIW it's starting OK for me, with a recently updated pkg snap.
> > > I'm not seeing any qt4 libraries being pulled in:
> > >   
> > 
> > Well I now have a second qt5 port that segfaults when trying to use
> > libproxy.
> > 
> > devel/zeal
> > https://gist.github.com/mulander/84f9f577fd4489fc581c593cabd15895
> > 
> > Here's the interesting part though. It doesn't crash when I'm running
> > xfce4. The segfaults happen only when I'm running gnome3 (3.18.2).
> > 
> > Did anyone hit similar problems with qt5 based ports on Gnome?
> > 
> > Regards,
> > Adam
> > 
> 
> With help from sthen@ I managed to pin point the crash to a null
> pointer dereference in libproxy.
> 
> The issue has been reported upstream:
>  https://github.com/libproxy/libproxy/issues/24
> with a patch to fix the problem:
>  https://github.com/libproxy/libproxy/pull/25
> 
> I would like to suggest adding the patch to our current libproxy port
> as the bug prevents www/otter-browser & devel/zeal from even starting
> up on Gnome 3. It might impact more qt5 related ports when ran under
> Gnome 3 (anything network related using libproxy).
> 
> Any OK's for adding the patch?

OK for me with 2 nitpicks :


> Index: Makefile
> ===================================================================
> RCS file: /cvs/ports/net/libproxy/Makefile,v
> retrieving revision 1.47
> diff -u -p -r1.47 Makefile
> --- Makefile  20 Mar 2016 17:59:21 -0000      1.47
> +++ Makefile  18 Apr 2016 16:55:33 -0000
> @@ -6,7 +6,7 @@ COMMENT-webkit=               pacrunner libproxy plug
>  GH_ACCOUNT=          libproxy
>  GH_PROJECT=          libproxy
>  GH_TAGNAME=          0.4.12
> -REVISION=            0
> +REVISION=            1

You are bumping 2 packages here.
Use this instead:
REVISION-main=  1

>  SUBST_VARS=          GH_TAGNAME
>  
>  PKGNAME-main=                ${DISTNAME}
> Index: patches/patch-libproxy_modules_ignore_ip_cpp
> ===================================================================
> RCS file: patches/patch-libproxy_modules_ignore_ip_cpp
> diff -N patches/patch-libproxy_modules_ignore_ip_cpp
> --- /dev/null 1 Jan 1970 00:00:00 -0000
> +++ patches/patch-libproxy_modules_ignore_ip_cpp      18 Apr 2016 16:55:33 
> -0000
> @@ -0,0 +1,22 @@
> +$OpenBSD$

Just add this:

https://github.com/libproxy/libproxy/issues/24

It's enough. And people who want to know more can follow the link.

> +Fix a null pointer dereference for qt5 applications when using
> +gnome 3.
> +
> +Prevents a crash of the following ports on gnome 3:
> + - devel/zeal
> + - www/otter-browser
> +
> +Reported upstream with a fix:
> + - https://github.com/libproxy/libproxy/issues/24
> + - https://github.com/libproxy/libproxy/pull/25
> +--- libproxy/modules/ignore_ip.cpp.orig      Mon Apr 18 18:14:53 2016
> ++++ libproxy/modules/ignore_ip.cpp   Mon Apr 18 18:15:26 2016
> +@@ -147,7 +147,7 @@ class ip_ignore_extension : public ignore_extension { 
> +                     else
> +                     {
> +                             /* If CIDR notation was used, get the netmask */
> +-                            if (sscanf(mask.c_str(), "%d", &cidr) == 1)
> ++                            if (ign_ip && sscanf(mask.c_str(), "%d", &cidr) 
> == 1)
> +                                     net_ip = 
> sockaddr_from_cidr(ign_ip->sa_family, cidr);
> +                     }
> + 
> 

-- 
Antoine

Reply via email to