AWT crasher patch to be back-ported by all distros
Andrew Hughes
gnu.andrew at redhat.com
Tue Dec 4 06:59:35 PST 2012
----- Original Message -----
> This bug affects LibreOffice, crashes it on all known OpenJDKs, and
> is
> committed upstream. It's worth patching IcedTea and all OpenJDK-
> derived packages until the next JDK7 update, which may be some time.
>
Funny, GCJ has pretty much an identical bug:
https://bugzilla.redhat.com/show_bug.cgi?id=857598
That's one of the fixes I wanted to get merged in, but just haven't had chance.
> Andrew.
>
>
> # HG changeset patch
> # User aph
> # Date 1354629728 0
> # Node ID ea20c9388d90fd9fda085c59ceae25ea9d686ec6
> # Parent 4aad3e6f68d2463f4fee63c93153394be6489c00
> 8004344: Fix a crash in ToolkitErrorHandler() in XlibWrapper.c
> Summary: Code does not check for JNU_GetEnv returning NULL.
> Reviewed-by: anthony
>
> diff -r 4aad3e6f68d2 -r ea20c9388d90
> src/solaris/native/sun/xawt/XlibWrapper.c
> --- a/src/solaris/native/sun/xawt/XlibWrapper.c Tue Dec 04 17:17:45
> 2012 +0400
> +++ b/src/solaris/native/sun/xawt/XlibWrapper.c Tue Dec 04 14:02:08
> 2012 +0000
> @@ -1260,13 +1260,15 @@
>
> JavaVM* jvm = NULL;
> static int ToolkitErrorHandler(Display * dpy, XErrorEvent * event) {
> + JNIEnv * env;
> if (jvm != NULL) {
> - JNIEnv * env = (JNIEnv *)JNU_GetEnv(jvm, JNI_VERSION_1_2);
> - return JNU_CallStaticMethodByName(env, NULL,
> "sun/awt/X11/XToolkit", "globalErrorHandler", "(JJ)I",
> - ptr_to_jlong(dpy),
> ptr_to_jlong(event)).i;
> - } else {
> - return 0;
> + env = (JNIEnv *)JNU_GetEnv(jvm, JNI_VERSION_1_2);
> + if (env) {
> + return JNU_CallStaticMethodByName(env, NULL,
> "sun/awt/X11/XToolkit", "globalErrorHandler", "(JJ)I",
> + ptr_to_jlong(dpy),
> ptr_to_jlong(event)).i;
> + }
> }
> + return 0;
> }
>
> /*
>
--
Andrew :)
Free Java Software Engineer
Red Hat, Inc. (http://www.redhat.com)
PGP Key: 248BDC07 (https://keys.indymedia.org/)
Fingerprint = EC5A 1F5E C0AD 1D15 8F1F 8F91 3B96 A578 248B DC07
More information about the distro-pkg-dev
mailing list