From nobody@FreeBSD.org  Sat Jan 28 14:06:35 2006
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 95C9D16A420
	for <freebsd-gnats-submit@FreeBSD.org>; Sat, 28 Jan 2006 14:06:35 +0000 (GMT)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [216.136.204.117])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 5FF5543D5A
	for <freebsd-gnats-submit@FreeBSD.org>; Sat, 28 Jan 2006 14:06:35 +0000 (GMT)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.13.1/8.13.1) with ESMTP id k0SE6Y0O083441
	for <freebsd-gnats-submit@FreeBSD.org>; Sat, 28 Jan 2006 14:06:34 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.13.1/8.13.1/Submit) id k0SE6Y2J083440;
	Sat, 28 Jan 2006 14:06:34 GMT
	(envelope-from nobody)
Message-Id: <200601281406.k0SE6Y2J083440@www.freebsd.org>
Date: Sat, 28 Jan 2006 14:06:34 GMT
From: Vaclav Kadlcik <vaclav.kadlcik@i.cz>
To: freebsd-gnats-submit@FreeBSD.org
Subject: jdk-1.4.2p8_2 crashes in libzip.so when starting eclipse
X-Send-Pr-Version: www-2.3

>Number:         92459
>Category:       java
>Synopsis:       jdk-1.4.2p8_2 crashes in libzip.so when starting eclipse
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    glewis
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sat Jan 28 14:10:10 GMT 2006
>Closed-Date:    Sun Feb 12 00:29:48 GMT 2006
>Last-Modified:  Sun Feb 12 00:29:48 GMT 2006
>Originator:     Vaclav Kadlcik
>Release:        6.0-RELEASE-p4
>Organization:
>Environment:
reeBSD nbvk 6.0-RELEASE-p4 FreeBSD 6.0-RELEASE-p4 #2: Thu Jan 26 08:45:24 CET 2006     root@nbvk:/usr/obj/usr/src/sys/NBVK  i386
>Description:
The patchset p8 broke comaptibility with eclipse:

java: jdk-1.4.2p8_2, eclipse: eclipse-3.1.1_3

When starting eclipse, it crashes with an error window: "JVM terminated. Exit code=1 /usr/local/bin/java (...edited...)" and an error log file hs_err_pidNNN.log:
An unexpected exception has been detected in native code outside the VM.
Unexpected Signal : 11 occurred at PC=0x286DCF57
Function=inflate_fast+0x17
Library=/usr/local/jdk1.4.2/jre/lib/i386/libzip.so

Current Java thread:
        at org.eclipse.swt.internal.gtk.OS._pango_context_list_families(Native Method)
(...edited...)
Dynamic libraries:
(...edited...)
0x286cd000      /usr/local/jdk1.4.2/jre/lib/i386/libzip.so
(...edited...)
0x42d15000      /lib/libz.so.3
(...edited...)
# Java VM: Java HotSpot(TM) Client VM (1.4.2-p8-root_28_jan_2006_08_37 mixed mode)

I looked at Changelog in bsd-jdk14-patches-8.tar.gz and found:
2005-12-08 Thursday 05:48  glewis
(...edited...)
          "Privatise" the symbols in libzip.so to avoid conflicting with those
          in the systems libz.so.  This conflict broke applications such as
          Eclipse which is linked with libz.so (via gtk+ I believe).

I'm afraid *this* change broke Eclipse...
>How-To-Repeat:
Build java/jdk14 and java/eclipse from ports and run eclipse.
>Fix:
Just a workaround: I uninstalled jdk-1.4.2p8_2 and installed jdk-1.4.2p7_2. (I usually run portupgrade with '-b'.)
>Release-Note:
>Audit-Trail:

From: HASHI Hiroaki <hashiz@tomba.cskk-sv.co.jp>
To: bug-followup@FreeBSD.org, freebsd-java@FreeBSD.org, vaclav.kadlcik@i.cz
Cc:  
Subject: Re: java/92459: jdk-1.4.2p8_2 crashes in libzip.so when starting
 eclipse
Date: Mon, 30 Jan 2006 11:13:34 +0900 (JST)

 ----Next_Part(Mon_Jan_30_11_13_34_2006_247)--
 Content-Type: Text/Plain; charset=us-ascii
 Content-Transfer-Encoding: 7bit
 
 Hello.
 
 I made a patch for jdk14.
 
 That using system's zlib instead of jdk's zlib-1.1.3 .
 
 ----Next_Part(Mon_Jan_30_11_13_34_2006_247)--
 Content-Type: Text/Plain; charset=us-ascii
 Content-Transfer-Encoding: 7bit
 Content-Disposition: inline; filename="jdk14.patch"
 
 diff -ruN jdk14.orig/Makefile jdk14/Makefile
 --- jdk14.orig/Makefile	Sat Jan 21 15:06:09 2006
 +++ jdk14/Makefile	Mon Jan 30 11:03:51 2006
 @@ -7,7 +7,7 @@
  
  PORTNAME=	jdk
  PORTVERSION=	${JDK_VERSION}p${JDK_PATCHSET_VERSION}
 -PORTREVISION=	2
 +PORTREVISION=	3
  CATEGORIES=	java devel
  MASTER_SITES=	# http://www.sun.com/software/java2/download.html
  #		 http://www.eyesbeyond.com/freebsddom/java/jdk14.html
 @@ -241,6 +241,8 @@
  		${REINPLACE_CMD} -e "s:-lkse:${PTHREAD_LIBS}:g" \
  			${WRKSRC}/$${file}; \
  	done
 +	@cd ${WRKDIR}/j2se/src/share/native/java/util/zip && \
 +		${RM} -rf zlib-1.1.3
  
  pre-build-linuxcheck:
  .if defined(WITH_LINUX_BOOTSTRAP)
 diff -ruN jdk14.orig/files/patch-java::zip::FILES_c.gmk jdk14/files/patch-java::zip::FILES_c.gmk
 --- jdk14.orig/files/patch-java::zip::FILES_c.gmk	Thu Jan  1 09:00:00 1970
 +++ jdk14/files/patch-java::zip::FILES_c.gmk	Mon Jan 30 10:26:37 2006
 @@ -0,0 +1,18 @@
 +--- ../../../../jdk14.orig/work/j2se/make/java/zip/FILES_c.gmk	Thu Sep 11 10:43:01 2003
 ++++ ../../j2se/make/java/zip/FILES_c.gmk	Mon Jan 30 02:22:58 2006
 +@@ -8,15 +8,4 @@
 + 	$(CTARGDIR)Inflater.c \
 + 	$(CTARGDIR)ZipFile.c \
 + 	$(CTARGDIR)ZipEntry.c \
 +-	$(CTARGDIR)zadler32.c \
 +-	$(CTARGDIR)zcrc32.c \
 +-	$(CTARGDIR)deflate.c \
 +-	$(CTARGDIR)trees.c \
 +-	$(CTARGDIR)zutil.c \
 +-	$(CTARGDIR)inflate.c \
 +-	$(CTARGDIR)infblock.c \
 +-	$(CTARGDIR)inftrees.c \
 +-	$(CTARGDIR)infcodes.c \
 +-	$(CTARGDIR)infutil.c \
 +-	$(CTARGDIR)inffast.c \
 + 	$(CTARGDIR)zip_util.c
 diff -ruN jdk14.orig/files/patch-java::zip::Makefile jdk14/files/patch-java::zip::Makefile
 --- jdk14.orig/files/patch-java::zip::Makefile	Thu Jan  1 09:00:00 1970
 +++ jdk14/files/patch-java::zip::Makefile	Mon Jan 30 10:27:34 2006
 @@ -0,0 +1,30 @@
 +--- ../../../../jdk14.orig/work/j2se/make/java/zip/Makefile	Thu Sep 11 10:43:01 2003
 ++++ ../../j2se/make/java/zip/Makefile	Mon Jan 30 02:04:45 2006
 +@@ -12,8 +12,6 @@
 + PRODUCT = sun
 + include $(BUILDDIR)/common/Defs.gmk
 + 
 +-ZLIB_VERSION = 1.1.3
 +-
 + #
 + # Files to compile.
 + #
 +@@ -58,12 +56,9 @@
 + CPPFLAGS += -UDEBUG 
 + endif
 + 
 +-CPPFLAGS += -I$(SHARE_SRC)/native/java/util/zip/zlib-$(ZLIB_VERSION)
 +-
 + #
 + # Add to ambient vpath so we pick up the library files
 + #
 +-vpath %.c $(SHARE_SRC)/native/$(PKGDIR)/zlib-$(ZLIB_VERSION)
 + 
 + #
 + # Has been converted to the JNI: generate JNI-style header files
 +@@ -73,4 +68,4 @@
 + #
 + # Link to JVM library for JVM_Zip* functions
 + #
 +-OTHER_LDLIBS = $(JVMLIB)
 ++OTHER_LDLIBS = $(JVMLIB) -lz
 
 ----Next_Part(Mon_Jan_30_11_13_34_2006_247)----
Responsible-Changed-From-To: freebsd-java->glewis 
Responsible-Changed-By: glewis 
Responsible-Changed-When: Tue Jan 31 16:31:25 UTC 2006 
Responsible-Changed-Why:  
I'll take it. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=92459 
State-Changed-From-To: open->closed 
State-Changed-By: glewis 
State-Changed-When: Sun Feb 12 00:28:47 UTC 2006 
State-Changed-Why:  
I backported the patch from jdk15 to fix this.  Its similar but not quite 
the same as the patch submitted by HASHI Hiroaki in the PR. 

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