bug-classpath
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug classpath/23863] New: mprec buffer overwrite bug


From: tromey at gcc dot gnu dot org
Subject: [Bug classpath/23863] New: mprec buffer overwrite bug
Date: 13 Sep 2005 17:52:30 -0000

Enable the assertions in mprec.c and run this code
on an x86-64 machine, and you will see an abort:

public class pr166657 {
  public long toLong(int x) { return (long) x; }
  public double doubleAt(int x) {
    return Double.longBitsToDouble(toLong(x));
  }
  public static void main(String[] args) {
    pr166657 p = new pr166657();
    System.out.println(p.doubleAt(5));
  }
}

Note that this works properly for systems where Pack_32
is defined.

I am going to check in a workaround.  Meanwhile, we should
consider updating our copy of fdlibm and mprec.  I looked
around and there appears to be a version out there that
dynamically resizes the 'x' arrays (which would solve this
problem in a general way).

-- 
           Summary: mprec buffer overwrite bug
           Product: classpath
           Version: 0.18
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: classpath
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: tromey at gcc dot gnu dot org
                CC: bug-classpath at gnu dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23863




reply via email to

[Prev in Thread] Current Thread [Next in Thread]