From flameeyes at gmail.com Thu May 10 01:28:45 2007 From: flameeyes at gmail.com (Diego 'Flameeyes' =?UTF-8?B?UGV0dGVuw7I=?=) Date: Thu, 10 May 2007 03:28:45 +0200 Subject: [PATCH] Missing free() after tempnam() call (java.util.zip) Message-ID: <20070510032845.3d0459ce@enterprise.flameeyes.is-a-geek.org> (I hope this is the right mailing list for this, if it isn't, please tell me where to post this :) ) I was looking at one warning coming from ld about the use of tmpname() function rather than something like mkstemp, and while looking at that, I found that the string returned by tempnam() was not being freed after use. I admit I don't have a Solaris box at hand to check if it's true there too, but at least Linux's and FreeBSD's versions of tempnam() allocates with malloc() the returned string. (My lack of a Solaris box at the moment is what stops me from trying to use mkstemp() already; I'll try to prepare a virtual machine with that as soon as I can). The attached very very trivial patch fixes the leak by freeing the string after use; it's a very small leak, but if I understand the code well (but I won't bet I do) if a software uses that code repeatedly, it might be significant. Anyway, I hope this can be of help. -- Diego "Flameeyes" Petten? http://farragut.flameeyes.is-a-geek.org/ -------------- next part -------------- A non-text attachment was scrubbed... Name: openjdk-tempname-free.patch.patch Type: text/x-patch Size: 587 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 189 bytes Desc: not available URL: From flameeyes at gmail.com Thu May 10 04:47:21 2007 From: flameeyes at gmail.com (Diego 'Flameeyes' =?UTF-8?B?UGV0dGVuw7I=?=) Date: Thu, 10 May 2007 06:47:21 +0200 Subject: [PATCH] Missing free() after tempnam() call (java.util.zip) In-Reply-To: <20070510032845.3d0459ce@enterprise.flameeyes.is-a-geek.org> References: <20070510032845.3d0459ce@enterprise.flameeyes.is-a-geek.org> Message-ID: <20070510064721.0b277710@enterprise.flameeyes.is-a-geek.org> On Thu, 10 May 2007 03:28:45 +0200 Diego 'Flameeyes' Petten? wrote: > Anyway, I hope this can be of help. Always double check that what you're attaching is what you had applied locally. This time is the right one. -- Diego "Flameeyes" Petten? http://farragut.flameeyes.is-a-geek.org/ -------------- next part -------------- A non-text attachment was scrubbed... Name: openjdk-tempname-free.patch.patch Type: text/x-patch Size: 589 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 189 bytes Desc: not available URL: From flameeyes at gmail.com Fri May 11 19:59:07 2007 From: flameeyes at gmail.com (Diego 'Flameeyes' =?UTF-8?B?UGV0dGVuw7I=?=) Date: Fri, 11 May 2007 21:59:07 +0200 Subject: Fw: [PATCH] Allow usage of external zlib copy Message-ID: <20070511215907.5795b7e3@enterprise.flameeyes.is-a-geek.org> After Phil Race's suggestion, I'm forwarding this to core-libs, as it might be more appropriate. Begin forwarded message: Date: Fri, 11 May 2007 07:39:39 +0200 From: Diego 'Flameeyes' Petten? To: build-dev at openjdk.java.net Subject: [PATCH] Allow usage of external zlib copy Most distributions have policies about using external copies of libraries whenever possible. OpenJDK ships with a series of libraries that are usually available on a system, like zlib and jpeg, thus breaking such a policy. The attached patch tries to correct part of this by letting use of external zlib copy when passing EXTERNAL_ZLIB=true at the make process. I'm also gonna work on a similar patch to use external jpeg library (that will likely depend on this one because of some of the files touched being the same). -- Diego "Flameeyes" Petten? http://farragut.flameeyes.is-a-geek.org/ -- Diego "Flameeyes" Petten? http://farragut.flameeyes.is-a-geek.org/ -------------- next part -------------- A non-text attachment was scrubbed... Name: openjdk-external-zlib.patch Type: text/x-patch Size: 6020 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 189 bytes Desc: not available URL: From Tom.Marble at Sun.COM Sat May 19 21:04:07 2007 From: Tom.Marble at Sun.COM (Tom Marble) Date: Sat, 19 May 2007 16:04:07 -0500 Subject: test message Message-ID: <464F6647.7030805@sun.com> All: Please ignore this test message. --Tom From betelgeuse at gentoo.org Thu May 24 17:14:21 2007 From: betelgeuse at gentoo.org (=?UTF-8?B?UGV0dGVyaSBSw6R0eQ==?=) Date: Thu, 24 May 2007 20:14:21 +0300 Subject: Fixing compiler warnings Message-ID: <4655C7ED.9010807@gentoo.org> This silences some QA warnings given by GCC. I don't have access to Solaris so it would probably be safest to test there before committing although man gettimeofday is claiming that the function is quite standard: CONFORMING TO SVr4, 4.3BSD. POSIX.1-2001 describes gettimeofday() but not settimeofday(). I haven't signed the SCA but this is hardly copyrightable. Regards, Petteri -- Gentoo/Java project lead -------------- next part -------------- A non-text attachment was scrubbed... Name: gettimeofday-declaration.patch Type: text/x-patch Size: 2001 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 252 bytes Desc: OpenPGP digital signature URL: From Alan.Bateman at Sun.COM Thu May 24 17:55:39 2007 From: Alan.Bateman at Sun.COM (Alan Bateman) Date: Thu, 24 May 2007 18:55:39 +0100 Subject: Fixing compiler warnings In-Reply-To: <4655C7ED.9010807@gentoo.org> References: <4655C7ED.9010807@gentoo.org> Message-ID: <4655D19B.1070603@sun.com> Petteri R?ty wrote: > This silences some QA warnings given by GCC. I don't have access to > Solaris so it would probably be safest to test there before committing > although man gettimeofday is claiming that the function is quite standard: > > CONFORMING TO > SVr4, 4.3BSD. POSIX.1-2001 describes gettimeofday() but not > settimeofday(). > > I haven't signed the SCA but this is hardly copyrightable. > > Regards, > Petteri > -- > Gentoo/Java project lead > Petteri - the networking libraries is the net-dev at openjdk.java.net mailing list so I would suggest posting the patch to that list. -Alan. From betelgeuse at gentoo.org Mon May 28 18:06:18 2007 From: betelgeuse at gentoo.org (=?UTF-8?B?UGV0dGVyaSBSw6R0eQ==?=) Date: Mon, 28 May 2007 21:06:18 +0300 Subject: jar launcher not able to handle -march=nocona Message-ID: <465B1A1A.7020604@gentoo.org> <<>>Recursively making dcpr all @ Mon May 28 19:55:30 EEST 2007 ... make[4]: Entering directory `/var/tmp/portage/dev-java/openjdk-1.7.0.0_alpha13/work/o/j2se/make/sun/dcpr' /bin/mkdir -p /var/tmp/portage/dev-java/openjdk-1.7.0.0_alpha13/work/o/control/build/linux-i586/classes /bin/echo -e "Copying classes from /opt/sun-jdk-1.7.0.0_alpha13/jre/lib/rt.jar" Copying classes from /opt/sun-jdk-1.7.0.0_alpha13/jre/lib/rt.jar (cd /var/tmp/portage/dev-java/openjdk-1.7.0.0_alpha13/work/o/control/build/linux-i586/classes ; /var/tmp/portage/dev-java/openjdk-1.7.0.0_alpha13/work/o/control/build/linux-i586/bin/jar xvf /opt/sun-jdk-1.7.0.0_alpha13/jre/lib/rt.jar sun/dc) /bin/sh: line 1: 17527 Segmentation fault /var/tmp/portage/dev-java/openjdk-1.7.0.0_alpha13/work/o/control/build/linux-i586/bin/jar xvf /opt/sun-jdk-1.7.0.0_alpha13/jre/lib/rt.jar sun/dc make[4]: *** [copy-closed-src-classes] Error 139 make[4]: Leaving directory `/var/tmp/portage/dev-java/openjdk-1.7.0.0_alpha13/work/o/j2se/make/sun/dcpr' make[3]: *** [all] Error 1 make[3]: Leaving directory `/var/tmp/portage/dev-java/openjdk-1.7.0.0_alpha13/work/o/j2se/make/sun' make[2]: *** [all] Error 1 make[2]: Leaving directory `/var/tmp/portage/dev-java/openjdk-1.7.0.0_alpha13/work/o/j2se/make' make[1]: *** [j2se-build] Error 2 make[1]: Leaving directory `/var/tmp/portage/dev-java/openjdk-1.7.0.0_alpha13/work/o/control/make' make: *** [dev-build] Error 2 !!! ERROR: dev-java/openjdk-1.7.0.0_alpha13 failed. Call stack: ebuild.sh, line 1615: Called dyn_compile ebuild.sh, line 972: Called qa_call 'src_compile' ebuild.sh, line 44: Called src_compile openjdk-1.7.0.0_alpha13.ebuild, line 120: Called die In this case I am building with "-O2 -march=nocona -g" and using the following patches: http://overlays.gentoo.org/proj/java/browser/java-experimental/dev-java/openjdk/files Here is the bt I get. The line numbers probably don't match because of O2: (gdb) set args xvf /opt/sun-jdk-1.7.0.0_alpha13/jre/lib/rt.jar sun/dc (gdb) run Starting program: /var/tmp/portage/dev-java/openjdk-1.7.0.0_alpha13/work/o/control/build/linux-i586/bin/jar xvf /opt/sun-jdk-1.7.0.0_alpha13/jre/lib/rt.jar sun/dc [Thread debugging using libthread_db enabled] [New Thread -1209010512 (LWP 14559)] Program received signal SIGSEGV, Segmentation fault. [Switching to Thread -1209010512 (LWP 14559)] hyperthreading_support () at ../../../src/solaris/bin/java_md.c:1189 1189 if (_launcher_debug) { (gdb) bt #0 hyperthreading_support () at ../../../src/solaris/bin/java_md.c:1189 #1 0x0804daf3 in logical_processors_per_package () at ../../../src/solaris/bin/java_md.c:1259 #2 0x0804db97 in physical_processors () at ../../../src/solaris/bin/java_md.c:1284 #3 0x0804dc05 in linux_i586_ServerClassMachine () at ../../../src/solaris/bin/java_md.c:1349 #4 0x0804dc66 in ServerClassMachine () at ../../../src/solaris/bin/java_md.c:1376 #5 0x0804a434 in CheckJvmType (pargc=0xbff8f660, argv=0xbff8f664, speculative=0 '\0') at ../../../src/share/bin/java.c:709 #6 0x0804e0df in CreateExecutionEnvironment (_argcp=0xbff8f660, _argvp=0xbff8f664, jrepath=0xbff8e5d8 "/var/tmp/portage/dev-java/openjdk-1.7.0.0_alpha13/work/o/control/build/linux-i586", so_jrepath=4096, jvmpath=0xbff8d5d8 "", so_jvmpath=4096, original_argv=0x8052008) at ../../../src/solaris/bin/java_md.c:295 #7 0x0804bbd2 in main (argc=0, argv=0x8052098) at ../../../src/share/bin/java.c:253 I am in the process of trying to replicate this without -O2 to get a back trace but any thoughts on the issue would be appreciated. Regards, Petteri -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 252 bytes Desc: OpenPGP digital signature URL: From betelgeuse at gentoo.org Mon May 28 19:31:33 2007 From: betelgeuse at gentoo.org (=?UTF-8?B?UGV0dGVyaSBSw6R0eQ==?=) Date: Mon, 28 May 2007 22:31:33 +0300 Subject: jar launcher not able to handle -march=nocona In-Reply-To: <465B1A1A.7020604@gentoo.org> References: <465B1A1A.7020604@gentoo.org> Message-ID: <465B2E15.7020409@gentoo.org> Petteri R?ty kirjoitti: > > I am in the process of trying to replicate this without -O2 to get a > back trace but any thoughts on the issue would be appreciated. > Seems this is caused by -fomit-frame-pointer. My svn checkout wasn't using that and the ebuild was. The stack trace seems the same with -march=nocona -g -fomit-frame-pointer Regards, Petteri -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 252 bytes Desc: OpenPGP digital signature URL: From David.Bristor at Sun.COM Wed May 30 18:25:31 2007 From: David.Bristor at Sun.COM (Dave Bristor) Date: Wed, 30 May 2007 11:25:31 -0700 Subject: jar launcher not able to handle -march=nocona In-Reply-To: <465B1A1A.7020604@gentoo.org> References: <465B1A1A.7020604@gentoo.org> Message-ID: <465DC19B.7010102@sun.com> Hi Petteri, This looks like an issue for the build-dev at openjdk.java.net list. Could you try posting there? Thanks, Dave Petteri R?ty wrote: > << >>>>Recursively making dcpr all @ Mon May 28 19:55:30 EEST 2007 ... > > make[4]: Entering directory > `/var/tmp/portage/dev-java/openjdk-1.7.0.0_alpha13/work/o/j2se/make/sun/dcpr' > /bin/mkdir -p > /var/tmp/portage/dev-java/openjdk-1.7.0.0_alpha13/work/o/control/build/linux-i586/classes > /bin/echo -e "Copying classes from > /opt/sun-jdk-1.7.0.0_alpha13/jre/lib/rt.jar" > Copying classes from /opt/sun-jdk-1.7.0.0_alpha13/jre/lib/rt.jar > (cd > /var/tmp/portage/dev-java/openjdk-1.7.0.0_alpha13/work/o/control/build/linux-i586/classes > ; > /var/tmp/portage/dev-java/openjdk-1.7.0.0_alpha13/work/o/control/build/linux-i586/bin/jar > xvf /opt/sun-jdk-1.7.0.0_alpha13/jre/lib/rt.jar sun/dc) > /bin/sh: line 1: 17527 Segmentation fault > /var/tmp/portage/dev-java/openjdk-1.7.0.0_alpha13/work/o/control/build/linux-i586/bin/jar > xvf /opt/sun-jdk-1.7.0.0_alpha13/jre/lib/rt.jar sun/dc > make[4]: *** [copy-closed-src-classes] Error 139 > make[4]: Leaving directory > `/var/tmp/portage/dev-java/openjdk-1.7.0.0_alpha13/work/o/j2se/make/sun/dcpr' > make[3]: *** [all] Error 1 > make[3]: Leaving directory > `/var/tmp/portage/dev-java/openjdk-1.7.0.0_alpha13/work/o/j2se/make/sun' > make[2]: *** [all] Error 1 > make[2]: Leaving directory > `/var/tmp/portage/dev-java/openjdk-1.7.0.0_alpha13/work/o/j2se/make' > make[1]: *** [j2se-build] Error 2 > make[1]: Leaving directory > `/var/tmp/portage/dev-java/openjdk-1.7.0.0_alpha13/work/o/control/make' > make: *** [dev-build] Error 2 > > !!! ERROR: dev-java/openjdk-1.7.0.0_alpha13 failed. > Call stack: > ebuild.sh, line 1615: Called dyn_compile > ebuild.sh, line 972: Called qa_call 'src_compile' > ebuild.sh, line 44: Called src_compile > openjdk-1.7.0.0_alpha13.ebuild, line 120: Called die > > In this case I am building with "-O2 -march=nocona -g" and using the > following patches: > http://overlays.gentoo.org/proj/java/browser/java-experimental/dev-java/openjdk/files > > Here is the bt I get. The line numbers probably don't match because of O2: > > (gdb) set args xvf /opt/sun-jdk-1.7.0.0_alpha13/jre/lib/rt.jar sun/dc > (gdb) run > Starting program: > /var/tmp/portage/dev-java/openjdk-1.7.0.0_alpha13/work/o/control/build/linux-i586/bin/jar > xvf /opt/sun-jdk-1.7.0.0_alpha13/jre/lib/rt.jar sun/dc > [Thread debugging using libthread_db enabled] > [New Thread -1209010512 (LWP 14559)] > > Program received signal SIGSEGV, Segmentation fault. > [Switching to Thread -1209010512 (LWP 14559)] > hyperthreading_support () at ../../../src/solaris/bin/java_md.c:1189 > 1189 if (_launcher_debug) { > (gdb) bt > #0 hyperthreading_support () at ../../../src/solaris/bin/java_md.c:1189 > #1 0x0804daf3 in logical_processors_per_package () at > ../../../src/solaris/bin/java_md.c:1259 > #2 0x0804db97 in physical_processors () at > ../../../src/solaris/bin/java_md.c:1284 > #3 0x0804dc05 in linux_i586_ServerClassMachine () at > ../../../src/solaris/bin/java_md.c:1349 > #4 0x0804dc66 in ServerClassMachine () at > ../../../src/solaris/bin/java_md.c:1376 > #5 0x0804a434 in CheckJvmType (pargc=0xbff8f660, argv=0xbff8f664, > speculative=0 '\0') at ../../../src/share/bin/java.c:709 > #6 0x0804e0df in CreateExecutionEnvironment (_argcp=0xbff8f660, > _argvp=0xbff8f664, jrepath=0xbff8e5d8 > "/var/tmp/portage/dev-java/openjdk-1.7.0.0_alpha13/work/o/control/build/linux-i586", > so_jrepath=4096, jvmpath=0xbff8d5d8 "", so_jvmpath=4096, > original_argv=0x8052008) at ../../../src/solaris/bin/java_md.c:295 > #7 0x0804bbd2 in main (argc=0, argv=0x8052098) at > ../../../src/share/bin/java.c:253 > > I am in the process of trying to replicate this without -O2 to get a > back trace but any thoughts on the issue would be appreciated. > > Regards, > Petteri > From betelgeuse at gentoo.org Wed May 30 20:06:16 2007 From: betelgeuse at gentoo.org (=?UTF-8?B?UGV0dGVyaSBSw6R0eQ==?=) Date: Wed, 30 May 2007 23:06:16 +0300 Subject: [PATCH] Re: jar launcher not able to handle -march=nocona In-Reply-To: <465DC19B.7010102@sun.com> References: <465B1A1A.7020604@gentoo.org> <465DC19B.7010102@sun.com> Message-ID: <465DD938.9040804@gentoo.org> Dave Bristor kirjoitti: > Hi Petteri, > > This looks like an issue for the build-dev at openjdk.java.net list. Could > you try posting there? > > Thanks, > Dave > Nope this is a bug in java_md.c I have no idea why that code is duplicated in those two files. I guess the hotspot version is never run during the build because fixing the j2se one was enough to make the issue go away. So far I haven't had any problems running junit tests with openjdk compile using -fomit-frame-pointer but we shall see. The patch was built with input from Ian Rogers and Diego Petten?. Regards, Petteri -------------- next part -------------- A non-text attachment was scrubbed... Name: cpuid-fomit-frame-pointer.patch Type: text/x-patch Size: 3352 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 252 bytes Desc: OpenPGP digital signature URL: