malloc failures in java/util/zip/Deflater

2009-07-08 Thread Mario Torre
Hi all, I've found a problem in the Deflater code in OpenJDK, where a length of zero bytes is passed to malloc. According to the specs, malloc may return either a valid pointer that can be passed to free, or NULL, while generally NULL is considered to be a failure. Linux and Solaris, albeit

hg: jdk7/tl/jdk: 2 new changesets

2009-07-08 Thread kelly . ohair
Changeset: d133d4052378 Author:ohair Date: 2009-07-08 09:11 -0700 URL: http://hg.openjdk.java.net/jdk7/tl/jdk/rev/d133d4052378 6858127: Missing -DNDEBUG on Linux and Windows native code compiles Reviewed-by: tbell, dcubed ! make/common/Defs-linux.gmk ! make/common/Defs-windows.gmk

Re: malloc failures in java/util/zip/Deflater

2009-07-08 Thread Roman Kennke
Hi Mario, > According to the specs, malloc may return either a valid pointer that > can be passed to free, or NULL, while generally NULL is considered to be > a failure. Linux and Solaris, albeit non specifying it, return always a > valid pointer, as far as I know I think NULL is returned in a

Re: malloc failures in java/util/zip/Deflater

2009-07-08 Thread Mario Torre
Il 08/07/2009 20:52, Roman Kennke ha scritto: Hi Mario, According to the specs, malloc may return either a valid pointer that can be passed to free, or NULL, while generally NULL is considered to be a failure. Linux and Solaris, albeit non specifying it, return always a valid pointer, as far as

Re: malloc failures in java/util/zip/Deflater

2009-07-08 Thread Roman Kennke
Hi Mario, > >> According to the specs, malloc may return either a valid pointer that > >> can be passed to free, or NULL, while generally NULL is considered to be > >> a failure. Linux and Solaris, albeit non specifying it, return always a > >> valid pointer, as far as I know > > > > I think NULL

ConcurrentLinkedQueue changes

2009-07-08 Thread Martin Buchholz
The long-awaited changes to ConcurrentLinkedQueue have come out of vaporware status and are ready for commit to openjdk7 soon. When it comes to concurrent lock-free data structures, even getting singly-linked lists right is really hard! We do not need additional review according to openjdk rules,

LinkedBlockingDeque and LinkedBlockingQueue

2009-07-08 Thread Martin Buchholz
Doug Lea and I have been working (slowly) on fixing LinkedBlockingDeque and LinkedBlockingQueue Although changes are unfinished, there has been great recent interest in this http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6805775 LinkedBlockingQueue Nodes should unlink themselves before becomin

Re: malloc failures in java/util/zip/Deflater

2009-07-08 Thread David Holmes - Sun Microsystems
Hi Mario, I'm not familiar with this particular code but doesn't a value of this_len==0 imply that there's nothing to do and a whole chunk of code here can be skipped? Is finding this_len==0 even valid here? Your patch fixes your problem, but it seems to me the code either shouldn't get this

Code review request for 6628737: Specification of wrapper class valueOf static factories should require caching

2009-07-08 Thread Joseph D. Darcy
Hello. Since JDK 5, to implement autoboxing, javac has relied on various static factory methods in the wrapper classes to perform the caching in the required range. While the factories said they could cache, they did not state they would definitely cache in the required range given in JLSv3

Re: Code review request for 6628737: Specification of wrapper class valueOf static factories should require caching

2009-07-08 Thread Mark Reinhold
Looks fine to me. Minor formatting nit in each delta except the first: > ... > > --- old/src/share/classes/java/lang/Character.java2009-07-08 > 18:38:13.0 -0700 > +++ new/src/share/classes/java/lang/Character.java2009-07-08 > 18:38:13.0 -0700 > @@ -2571,6 +2571,10 @@ >