octave-bug-tracker
[Top][All Lists]
Advanced

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

[Octave-bug-tracker] [bug #45264] ov-java.cc-tst fails with openjdk-7 jr


From: Tatsuro MATSUOKA
Subject: [Octave-bug-tracker] [bug #45264] ov-java.cc-tst fails with openjdk-7 jre 32 bit on octave 4.0.0
Date: Sat, 06 Jun 2015 05:45:37 +0000
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_3) AppleWebKit/537.75.14 (KHTML, like Gecko) Version/7.0.3 Safari/7046A194A

URL:
  <http://savannah.gnu.org/bugs/?45264>

                 Summary: ov-java.cc-tst fails with openjdk-7 jre 32 bit on
octave 4.0.0
                 Project: GNU Octave
            Submitted by: tmacchant
            Submitted on: 2015年06月06日 05時45分36秒
                Category: Interpreter
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: Incorrect Result
                  Status: None
             Assigned to: None
         Originator Name: 
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any
                 Release: 4.0.0
        Operating System: GNU/Linux

    _______________________________________________________

Details:

The topic originally has been discussed at:
http://octave.1599824.n4.nabble.com/Re-ov-java-cc-tst-fails-on-Lubuntu-14-04-td4670605.html

On octave 4.0.0 build with openjdk-7 on 32 bit platform (ubuntu),
ov-java.cc-tst fails:


 assert (javaMethod ("binarySearch", "java.util.Arrays", [90 100 255], 255),
2); 
 assert (javaMethod ("binarySearch", "java.util.Arrays", uint8 ([90 100 255]),
uint8 (255)) < 0); 
 assert (javaMethod ("binarySearch", "java.util.Arrays", uint8 ([90 100 128]),
uint8 (128)) < 0); 
 assert (javaMethod ("binarySearch", "java.util.Arrays", uint8 ([90 100 127]),
uint8 (127)), 2); 
 assert (javaMethod ("binarySearch", "java.util.Arrays", uint16 ([90 100
128]), uint16 (128)), 2); 
!!!!! test failed 


The same fail was observed by Julien Bect with Ubuntu 14.10 / 32 bits / gcc
4.9.1. (Perhaps openjdk-7 is used.) 


In the above, only the first test in in failure.


>> assert (javaMethod ("binarySearch", "java.util.Arrays", [90 100 255], 255),
2); 
error: [java] java.lang.ClassCastException: java.lang.Double cannot be cast to
java.lang.Float 
error: evaluating argument list element number 1 


This error appears on octave-4.0.0 + openjdk-7 + 32 bit.
On 64 bit ubuntu with openjdk-7, on 32 bit ubuntu with openjdk-6,
this error does not occur.

The test suggested by Rik,


assert (javaMethod ("binarySearch", "java.util.Arrays",  single ([90 100
255]), single (255)), 2); 


passes on octave-4.0.0 built with openjdk-7 on 32bit ubuntu.
 
Rik stated in the thread introduced at the top,

Maybe the default numeric type for a 32-bit JRE is float rather than double? 
Seems odd though.  The 32-bit JRE is supposed to be about the size of
references and therefore about the size of addressable 
memory. 




    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?45264>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

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