From amdmi3@amdmi3.ru  Fri Aug  3 16:04:53 2012
Return-Path: <amdmi3@amdmi3.ru>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 9BCE71065678
	for <freebsd-gnats-submit@freebsd.org>; Fri,  3 Aug 2012 16:04:53 +0000 (UTC)
	(envelope-from amdmi3@amdmi3.ru)
Received: from smtp.timeweb.ru (smtp.timeweb.ru [92.53.116.15])
	by mx1.freebsd.org (Postfix) with ESMTP id 4D3748FC16
	for <freebsd-gnats-submit@freebsd.org>; Fri,  3 Aug 2012 16:04:52 +0000 (UTC)
Received: from [213.148.20.85] (helo=hive.panopticon)
	by smtp.timeweb.ru with esmtpsa (TLSv1:CAMELLIA256-SHA:256)
	(Exim 4.76)
	(envelope-from <amdmi3@amdmi3.ru>)
	id 1SxKMm-0006Ot-U9
	for FreeBSD-gnats-submit@freebsd.org; Fri, 03 Aug 2012 20:04:44 +0400
Received: from hades.panopticon (hades.panopticon [192.168.0.32])
	by hive.panopticon (Postfix) with ESMTP id 94911B84D
	for <FreeBSD-gnats-submit@freebsd.org>; Fri,  3 Aug 2012 20:04:44 +0400 (MSK)
Received: by hades.panopticon (Postfix, from userid 1000)
	id 76E16531; Fri,  3 Aug 2012 20:04:44 +0400 (MSK)
Message-Id: <20120803160444.76E16531@hades.panopticon>
Date: Fri,  3 Aug 2012 20:04:44 +0400 (MSK)
From: Dmitry Marakasov <amdmi3@FreeBSD.org>
Reply-To: Dmitry Marakasov <amdmi3@FreeBSD.org>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: java/icedtea-web update to 1.2.1 makes firefox die with SIGBUS
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         170352
>Category:       ports
>Synopsis:       java/icedtea-web update to 1.2.1 makes firefox die with SIGBUS
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    jkim
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Aug 03 16:10:14 UTC 2012
>Closed-Date:    Wed Aug 15 21:04:48 UTC 2012
>Last-Modified:  Wed Aug 15 21:04:48 UTC 2012
>Originator:     Dmitry Marakasov
>Release:        FreeBSD 9.0-RELEASE-p3 amd64
>Organization:
>Environment:
System: FreeBSD hades.panopticon 9.0-RELEASE-p3 FreeBSD 9.0-RELEASE-p3 #0: Wed Jun 13 17:39:20 MSK 2012 root@hades.panopticon:/usr/obj/usr/src/sys/HADES amd64


>Description:
After updating java/icedtea-web to 1.2.1, java applets no longer work: running an applet makes firefox die with SIGBUS moments after an applet was started (can see it's window for a moment, then it dies). Downgrading icedtea-webz to 1.2_2 solved the problem.
>How-To-Repeat:
Run java applet with icedtea 1.2.1
>Fix:
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports-bugs->freebsd-java 
Responsible-Changed-By: edwin 
Responsible-Changed-When: Fri Aug 3 16:10:24 UTC 2012 
Responsible-Changed-Why:  
Over to maintainer (via the GNATS Auto Assign Tool) 

http://www.freebsd.org/cgi/query-pr.cgi?pr=170352 

From: Jan Beich <jbeich@tormail.org>
To: Dmitry Marakasov <amdmi3@FreeBSD.org>
Cc: bug-followup@freebsd.org
Subject: Re: ports/170352: java/icedtea-web update to 1.2.1 makes firefox die with SIGBUS
Date: Fri, 03 Aug 2012 23:40:38 +0300

 --=-=-=
 Content-Type: text/plain
 
 Dmitry Marakasov <amdmi3@FreeBSD.org> writes:
 
 > After updating java/icedtea-web to 1.2.1, java applets no longer work:
 > running an applet makes firefox die with SIGBUS moments after an
 
 Try libxul-10.0.6 from gecko@ repo. If it doesn't help also try the
 attached patch.
 
 
 --=-=-=
 Content-Type: text/x-patch
 Content-Disposition: attachment; filename=gecko_sync.diff
 
 diff --git a/www/firefox/files/patch-bug753046 b/www/firefox/files/patch-bug753046
 index d2d1a12..a1f0503 100644
 --- a/www/firefox/files/patch-bug753046
 +++ b/www/firefox/files/patch-bug753046
 @@ -218,21 +218,23 @@ $NetBSD: patch-ipc_chromium_src_base_debug__util__posic.cc,v 1.3 2012/04/01 15:1
   
   #include <errno.h>
   #include <fcntl.h>
 -@@ -17,8 +17,13 @@
 +@@ -17,9 +17,16 @@
   #include <unistd.h>
   #if MOZ_HAVE_EXECINFO_H
   #include <execinfo.h>
 --#include <sys/sysctl.h>
 ++#endif
 ++
 ++#if defined(OS_MACOSX) || defined(OS_BSD)
 + #include <sys/sysctl.h>
   #endif
 + 
  +#if defined(OS_DRAGONFLY) || defined(OS_FREEBSD)
  +#include <sys/user.h>
 -+#elif defined(OS_FREEBSD)
 -+#include <sys/proc.h>
  +#endif
 -+#include <sys/sysctl.h>
 - 
 ++
   #include "base/basictypes.h"
   #include "base/eintr_wrapper.h"
 + #include "base/logging.h"
  @@ -32,7 +37,7 @@ bool DebugUtil::SpawnDebuggerOnProcess(u
     return false;
   }
 @@ -531,18 +533,6 @@ $NetBSD: patch-ipc_chromium_src_base_message__loop.cc,v 1.1 2012/03/06 12:34:09
       pump_ = new base::MessagePumpForUI();
   #endif  // OS_LINUX
     } else if (type_ == TYPE_IO) {
 -$NetBSD: patch-ipc_chromium_src_base_platform__file__posix.cc,v 1.1 2011/07/12 15:12:36 tnn Exp $
 -
 ---- ipc/chromium/src/base/platform_file_posix.cc.orig	2011-06-15 21:57:27.000000000 +0000
 -+++ ipc/chromium/src/base/platform_file_posix.cc
 -@@ -9,6 +9,7 @@
 - #ifdef ANDROID
 - #include <linux/stat.h>
 - #endif
 -+#include <sys/stat.h> /* for S_IRUSR */
 - 
 - #include "base/logging.h"
 - #include "base/string_util.h"
  $NetBSD: patch-ipc_chromium_src_base_platform__thread.h,v 1.1 2012/03/06 12:34:09 ryoon Exp $
  
  --- ipc/chromium/src/base/platform_thread.h.orig	2011-12-20 23:28:19.000000000 +0000
 @@ -641,7 +631,7 @@ $NetBSD: patch-ipc_chromium_src_base_process__util__bsd.cc,v 1.4 2012/04/01 15:1
  
  --- ipc/chromium/src/base/process_util_bsd.cc.orig	2012-04-01 00:04:28.000000000 +0000
  +++ ipc/chromium/src/base/process_util_bsd.cc
 -@@ -0,0 +1,326 @@
 +@@ -0,0 +1,322 @@
  +// Copyright (c) 2008 The Chromium Authors. All rights reserved.
  +// Use of this source code is governed by a BSD-style license that can be
  +// found in the LICENSE file.
 @@ -672,7 +662,6 @@ $NetBSD: patch-ipc_chromium_src_base_process__util__bsd.cc,v 1.4 2012/04/01 15:1
  +PRE_SYS_INCLUDE
  +#include <sys/user.h>
  +POST_SYS_INCLUDE
 -+#define HAVE_POSIX_SPAWN	1
  +#endif
  +#if defined(OS_FREEBSD)
  +PRE_SYS_INCLUDE
 @@ -687,18 +676,15 @@ $NetBSD: patch-ipc_chromium_src_base_process__util__bsd.cc,v 1.4 2012/04/01 15:1
  +#include "base/string_tokenizer.h"
  +#include "base/string_util.h"
  +
 -+#if defined(OS_NETBSD)
 -+#include <sys/param.h>
 -+#if __NetBSD_Version__ >= 600000000
 ++#if defined(_POSIX_SPAWN) && _POSIX_SPAWN > 0
  +#define HAVE_POSIX_SPAWN	1
  +#endif
 -+#endif
  +
  +#ifdef HAVE_POSIX_SPAWN
  +PRE_SYS_INCLUDE
  +#include <spawn.h>
 ++extern "C" char **environ;
  +POST_SYS_INCLUDE
 -+extern "C" char **environ __dso_public;
  +#endif
  +
  +namespace {
 @@ -1255,16 +1241,31 @@ $NetBSD: patch-ipc_glue_GeckoChildProcessHost.cpp,v 1.2 2012/03/15 08:30:06 ryoo
                     newEnvVars,
   #endif
                     false, &process, arch);
 +diff --git ipc/glue/SharedMemorySysV.h ipc/glue/SharedMemorySysV.h
 +index f37998d..b05dc7b 100644
 +--- ipc/glue/SharedMemorySysV.h
 ++++ ipc/glue/SharedMemorySysV.h
 +@@ -8,7 +8,7 @@
 + #ifndef mozilla_ipc_SharedMemorySysV_h
 + #define mozilla_ipc_SharedMemorySysV_h
 + 
 +-#if defined(OS_LINUX) && !defined(ANDROID)
 ++#if defined(OS_LINUX) && !defined(ANDROID) || defined(OS_BSD)
 + 
 + // SysV shared memory isn't available on Windows, but we define the
 + // following macro so that #ifdefs are clearer (compared to #ifdef
  $NetBSD: patch-mm,v 1.13 2012/06/05 18:09:21 ryoon Exp $
  
  --- toolkit/library/Makefile.in.orig	2012-05-23 18:57:09.000000000 +0000
  +++ toolkit/library/Makefile.in
 -@@ -534,6 +538,10 @@ EXTRA_DSO_LDOPTS += -lelf -ldemangle
 +@@ -534,6 +538,12 @@ EXTRA_DSO_LDOPTS += -lelf -ldemangle
   endif
   endif
   
  +ifneq (,$(filter DragonFly FreeBSD NetBSD OpenBSD,$(OS_ARCH)))
  +OS_LIBS += $(call EXPAND_LIBNAME,kvm)
 ++#EXTRA_DSO_LDOPTS += -Wl,--ignore-unresolved-symbol,environ
 ++EXTRA_DSO_LDOPTS += -Wl,--warn-unresolved-symbols
  +endif
  +
   ifeq ($(OS_ARCH),WINNT)
 diff --git a/www/firefox/files/patch-xpcom__threads__nsThreadManager.cpp b/www/firefox/files/patch-xpcom__threads__nsThreadManager.cpp
 index 80e8322..73db2c3 100644
 --- a/www/firefox/files/patch-xpcom__threads__nsThreadManager.cpp
 +++ b/www/firefox/files/patch-xpcom__threads__nsThreadManager.cpp
 @@ -4,7 +4,7 @@
   nsresult
   nsThreadManager::Init()
   {
 -+#ifdef NS_TLS && (__FreeBSD_version < 802513 \
 ++#if defined(NS_TLS) && (__FreeBSD_version < 802513 \
  +  || (__FreeBSD_version >= 900000 && __FreeBSD_version < 900045))
  +  if (!gTLSThreadID)
  +    gTLSThreadID = mozilla::threads::Generic;
 
 --=-=-=--

From: Dmitry Marakasov <amdmi3@amdmi3.ru>
To: Jan Beich <jbeich@tormail.org>
Cc: bug-followup@freebsd.org
Subject: Re: ports/170352: java/icedtea-web update to 1.2.1 makes firefox die
 with SIGBUS
Date: Fri, 10 Aug 2012 04:47:57 +0400

 * Jan Beich (jbeich@tormail.org) wrote:
 
 > > After updating java/icedtea-web to 1.2.1, java applets no longer work:
 > > running an applet makes firefox die with SIGBUS moments after an
 > 
 > Try libxul-10.0.6 from gecko@ repo.
 
 It doesn't build:
 
 http://people.freebsd.org/~amdmi3/xul10.log
 
 Same in tinderbox.
 
 -- 
 Dmitry Marakasov   .   55B5 0596 FF1E 8D84 5F56  9510 D35A 80DD F9D2 F77D
 amdmi3@amdmi3.ru  ..:  jabber: amdmi3@jabber.ru    http://www.amdmi3.ru
State-Changed-From-To: open->feedback 
State-Changed-By: jkim 
State-Changed-When: Mon Aug 13 21:28:43 UTC 2012 
State-Changed-Why:  
I just committed a fix.  If it doesn't work, please let me know.  Thanks! 


Responsible-Changed-From-To: freebsd-java->jkim 
Responsible-Changed-By: jkim 
Responsible-Changed-When: Mon Aug 13 21:28:43 UTC 2012 
Responsible-Changed-Why:  
I just committed a fix.  If it doesn't work, please let me know.  Thanks! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=170352 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/170352: commit references a PR
Date: Mon, 13 Aug 2012 21:28:04 +0000 (UTC)

 Author: jkim
 Date: Mon Aug 13 21:27:49 2012
 New Revision: 302483
 URL: http://svn.freebsd.org/changeset/ports/302483
 
 Log:
   Fix web plugin crash with Firefox 14.
   
   PR:		ports/170352
   Obtained from:	IcedTea Project (PR1106)
 
 Added:
   head/java/icedtea-web/files/patch-plugin-icedteanp-IcedTeaNPPlugin.cc   (contents, props changed)
 Modified:
   head/java/icedtea-web/Makefile
 
 Modified: head/java/icedtea-web/Makefile
 ==============================================================================
 --- head/java/icedtea-web/Makefile	Mon Aug 13 19:56:30 2012	(r302482)
 +++ head/java/icedtea-web/Makefile	Mon Aug 13 21:27:49 2012	(r302483)
 @@ -7,6 +7,7 @@
  
  PORTNAME=	icedtea-web
  PORTVERSION=	1.2.1
 +PORTREVISION=	1
  CATEGORIES=	java www
  MASTER_SITES=	http://icedtea.classpath.org/download/source/
  
 
 Added: head/java/icedtea-web/files/patch-plugin-icedteanp-IcedTeaNPPlugin.cc
 ==============================================================================
 --- /dev/null	00:00:00 1970	(empty, because file is newly added)
 +++ head/java/icedtea-web/files/patch-plugin-icedteanp-IcedTeaNPPlugin.cc	Mon Aug 13 21:27:49 2012	(r302483)
 @@ -0,0 +1,17 @@
 +--- plugin/icedteanp/IcedTeaNPPlugin.cc	Thu Aug 02 09:11:37 2012 -0400
 ++++ plugin/icedteanp/IcedTeaNPPlugin.cc	Tue Aug 07 10:59:11 2012 -0400
 +@@ -2053,8 +2053,13 @@
 + 
 +   //Ensure any unused fields are NULL
 +   memset(&browser_functions, 0, sizeof(NPNetscapeFuncs));
 ++
 ++  //browserTable->size can be larger than sizeof(NPNetscapeFuncs) (PR1106)
 ++  size_t copySize = browserTable->size < sizeof(NPNetscapeFuncs) ?
 ++                    browserTable->size : sizeof(NPNetscapeFuncs);
 ++
 +   //Copy fields according to given size
 +-  memcpy(&browser_functions, browserTable, browserTable->size);
 ++  memcpy(&browser_functions, browserTable, copySize);
 + 
 +   return true;
 + }
 _______________________________________________
 svn-ports-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/svn-ports-all
 To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"
 
State-Changed-From-To: feedback->closed 
State-Changed-By: jkim 
State-Changed-When: Wed Aug 15 21:03:41 UTC 2012 
State-Changed-Why:  
Several people reported the problem is indeed fixed. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=170352 
>Unformatted:
