[Bug 116] New: wrong NaN -> int conversion
[email protected] Tue, 22 Mar 2005 09:16:56 -0500
| Newsgroups | gmane.comp.java.vm.sablevm.bugs |
|---|---|
| Message-ID | <[email protected]> |
http://sablevm.org/bugs/show_bug.cgi?id=116
Summary: wrong NaN -> int conversion
Product: SableVM
Version: unspecified
Platform: PC
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P2
Component: default
AssignedTo: [email protected]
ReportedBy: [email protected]
QAContact: [email protected]
A float NaN casted to int is supposed to be 0. Sablevm (1.11.1) makes it
-2147483648 instead.
Testcase:
public class NaN
{
public static void main(String[] args)
{
float f = Float.NaN;
System.out.println((int) f);
}
}
Be careful about javac: (int) Float.NaN is computed at compile-time as zero,
which would hide sablevm's bug.
SableVM version 1.11.1
- compile date and time: 2005-03-21 03:56:38 UTC
- gcc version: 3.3.5 (Debian 1:3.3.5-12)
- 'real life brokenness' features enabled
- signal based exception detection
- copying garbage collection
- bidirectional object layout
- inline-threaded interpreter
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
You are the QA contact for the bug, or are watching the QA contact.