[kaffe] patch to check zlib return for OOM
Dalibor Topic
robilad at kaffe.org
Wed Sep 1 14:54:31 PDT 2004
jrandom wrote:
>-----BEGIN PGP SIGNED MESSAGE-----
>Hash: SHA1
>
>'lo all, here's another fix for a minor problem I ran into. I keep
>an eye out for OOMs, but at the moment, some of the native zip code
>doesn't check for that. I noticed this from my logs:
>
> java.lang.Error: insufficient memory
> at java.util.zip.Deflater.init (Deflater.java)
> at java.util.zip.Deflater.<init> (Deflater.java:46)
> at java.util.zip.GZIPOutputStream.<init>
>(GZIPOutputStream.java:83)
> [snip]
>
>Trivial fixes checking zlib's return values for OOMs as well as
>another check in Deflater.c (mirroring Inflater.c's handling)
>attached. I couldn't find an explicit style guide ref for the
>construct used (declaring a variable within a condition of a switch
>block), so I just tried something that looked normal - change as
>necessary, of course.
>
>
>
Looks good to me, thanks. I've checked it in. Keep 'em coming ;)
cheers,
dalibor topic
More information about the kaffe
mailing list