Do not let internal JDK zlib symbols leak out of fastdebug

Martin Buchholz martinrb at
Mon Mar 4 22:36:56 UTC 2013

On Mon, Mar 4, 2013 at 3:02 AM, Florian Weimer <fweimer at> wrote:

> On 02/22/2013 11:03 PM, Martin Buchholz wrote:
>  I've finally figured out why fastdebug jdk occasionally gives
>> InternalError
>> in the zip code.
> In the distant past, I also saw this with product builds.  Triggering
> conditions involved a JNI DSO calling dlopen(RTLD_GLOBAL) on another DSO
> which eventually triggered loading the system zlib.  This might still be
> relevant on stock OpenJDK 7.
> IcedTea avoids this by linking against system zlib.

It's certainly risky to have two separate system libraries in the same
process using the same symbols.  You are then very dependent on carefully
using the linker (or utilties like objcopy) to produce "symbol jails" where
one set of symbols cannot affect the other.  Which is not consistent with
traditional linker culture where there is a single global symbol namespace.

More information about the core-libs-dev mailing list