This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[patch] [4.0] string-to-double conversion can throw NullPointerException


Ok to backport the fix for PR classpath/23863 to the 4.0 branch,
causing a build failure of kaffe on amd64?

  Matthias

2005-09-15  Tom Tromey  <tromey@redhat.com>

        Workaround for PR classpath/23863:
        * native/fdlibm/mprec.h (MAX_BIGNUM_WDS): Define as 128 on
        non-Pack_32 platforms.

Index: libjava/java/lang/mprec.h
===================================================================
--- libjava/java/lang/mprec.h	(revision 110020)
+++ libjava/java/lang/mprec.h	(working copy)
@@ -292,7 +292,12 @@
 
 
 #define MAX_BIGNUMS 16
+#ifdef Pack_32
 #define MAX_BIGNUM_WDS 32
+else
+  /* Note that this is a workaround for */
+#define MAX_BIGNUM_WDS 128
+#endif
 
 struct _Jv_Bigint
 {


Michael Koch writes:
> On Fri, Jan 20, 2006 at 12:52:54AM +0100, Matthias Klose wrote:
> > From: "Aaron M. Ucko" <ucko@debian.org>
> > To: "Aaron M. Ucko" <ucko@debian.org>
> > Cc: 348792@bugs.debian.org, control@bugs.debian.org
> > Date: Thu, 19 Jan 2006 18:34:38 -0500
> > Subject: Bug#348792: libgcj6: string-to-double conversion can throw NullPointerException
> > 
> > tags 348792 + patch
> > thanks
> > 
> > It looks like this is PR classpath/23863, and can be worked around
> > (rather inefficiently, but that's life) by increasing MAX_BIGNUM_WDS
> > to 128 when Pack_32 isn't defined, per
> > 
> > http://cvs.savannah.gnu.org/viewcvs/classpath/classpath/native/fdlibm/mprec.h?tr1=1.4&tr2=1.5&r1=text&r2=text&diff_format=u
> > 
> > Could you please apply that patch?
> 
> Yes, Matthias. This patch looks right. This will fix #348760 too.
> Shall I create a dpatch file for you or will you do it ?
> The gcc debian build system is still a mystery to me.
> 
> 
> Cheers,
> Michael
> -- 
> Escape the Java Trap with GNU Classpath!
> http://www.gnu.org/philosophy/java-trap.html
> 
> Join the community at http://planet.classpath.org/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]