Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#83 [195][203] Assertion failure on denorm.toString

confirmed
closed-fixed
Eric Blake
emitter (227)
7
2001-02-22
2000-04-04
Eric Blake
No

[195]
From philip@intelligentdigital.com Tue Apr 4 11:06:07 2000
Received: from localhost (localhost [127.0.0.1])
by oss.software.ibm.com (8.9.3/8.9.3) with ESMTP id LAA28671
for <jikes-bugs@oss.software.ibm.com>; Tue, 4 Apr 2000 11:06:06 -0500
Date: Tue, 4 Apr 2000 11:06:06 -0500
From: philip@intelligentdigital.com
Message-Id: <200004041606.LAA28671@oss.software.ibm.com>
To: jikes-bugs@www10.software.ibm.com
Subject: assertion failed error

Full_Name: Philip Wickline
Version: 1.11
OS: NT4 sp6
Submission from: (NULL) (216.248.128.50)

I'm getting a strange bug that makes it impossible to use jikes at our site -
certain java files cause jikes 1.11 without the encoding option to die like the
following:

jikes -g OfferingObject.java
Assertion failed: floor(f) > 0.0f && floor(f) < 10.0f, file config.cpp, line
214

On the other hand, if I use 1.11 with encoding, then it doesn't die, it just
goes into an infinite loop.

Any ideas what's happening here? This is very unfortunate, since we would love
to be using jikes, but this problem makes it impossible.

Thanks,
Philip

[203]
From greg-jikes-dev@nest.cx Sun Apr 16 12:41:26 2000
Received: from localhost (localhost [127.0.0.1])
by oss.software.ibm.com (8.9.3/8.9.3) with ESMTP id MAA05621
for <jikes-bugs@oss.software.ibm.com>; Sun, 16 Apr 2000 12:41:26 -0500
Date: Sun, 16 Apr 2000 12:41:26 -0500
From: greg-jikes-dev@nest.cx
Message-Id: <200004161741.MAA05621@oss.software.ibm.com>
To: jikes-bugs@www10.software.ibm.com
Subject: FloatToString::FloatToString(Float.MIN_VALUE) results in assertion failure

Full_Name: Gregory Steuck
Version: 1.11
OS: OpenBSD
Submission from: (NULL) (24.7.194.160)

[greg@home greg]$ cat a.java
public class a {
a() {
String a = "" + Float.MIN_VALUE;
}
}
[greg@home greg]$ CLASSPATH=jdk1.1.8/lib/classes.zip /usr/src/jikes/src/jikes
a.java
assertion "floor(f) > 0.0f && floor(f) < 10.0f" failed: file
"/usr/src/jikes/src/config.cpp", line 214
Abort trap (core dumped)
[greg@home greg]$ gdb /usr/src/jikes/src/jikes jikes.core
GNU gdb 4.16.1
Copyright 1996 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "i386-unknown-openbsd2.6"...
Core was generated by `jikes'.
Program terminated with signal 6, Abort trap.
Reading symbols from /usr/libexec/ld.so...done.
Reading symbols from /usr/lib/libstdc++.so.30.0...done.
Reading symbols from /usr/lib/libm.so.0.1...done.
Reading symbols from /usr/lib/libc.so.24.2...done.
#0 0x403e3f2f in _thread_sys_kill ()
(gdb) where
#0 0x403e3f2f in _thread_sys_kill ()
#1 0x403e38cc in abort ()
#2 0x403a8b53 in __assert ()
#3 0x2c2edb in FloatToString::FloatToString (this=0xdfbfb92c, num=@0x4241cc)
at /usr/src/jikes/src/config.cpp:214
#4 0x292fd6 in Semantic::CastPrimitiveValue ()
#5 0x294141 in Semantic::ConvertToType ()
#6 0x29baa7 in Semantic::ProcessPLUS ()
#7 0x2a331e in Semantic::ProcessBinaryExpression ()
#8 0x2bbaa3 in Semantic::ProcessVariableInitializer ()
#9 0x1cbbd4 in Semantic::ProcessLocalVariableDeclarationStatement ()
#10 0x1c9146 in Semantic::ProcessBlockStatements ()
#11 0x1e3e14 in Semantic::ProcessConstructorBody ()
#12 0x1e62eb in Semantic::ProcessExecutableBodies ()
#13 0xd2fe9 in TypeSymbol::ProcessExecutableBodies ()
#14 0x13c050 in Control::ProcessBodies ()
#15 0x1389b7 in Control::ProcessFile ()
#16 0x12baf5 in Control::Control ()
#17 0x2420 in main ()
(gdb) up 3
#3 0x2c2edb in FloatToString::FloatToString (this=0xdfbfb92c, num=@0x4241cc)
at /usr/src/jikes/src/config.cpp:214
214 assert(floor(f) > 0.0f && floor(f) < 10.0f); // make sure there
is only one digit !!!
Current language: auto; currently c++
(gdb) print num
$1 = (IEEEfloat &) @0x4241cc: {value = {float_value = 1.40129846e-45,
word = 1}}
(gdb) print f
$2 = 1.40129839e-06
(gdb) list
209 {
210 decimal_exponent--;
211 f *= 10.0;
212 }
213
214 assert(floor(f) > 0.0f && floor(f) < 10.0f); // make sure there
is only one digit !!!
215 }
216
217 char *s = str;
218 if (num.IsNegative()) // if the number is negative, add the minus
sign

Discussion

  • Eric Blake
    Eric Blake
    2001-01-23

    Patch 36 addresses this issue, at least removing the assertion failure. However, the output of the string conversion is still wrong, so I am leaving this bug open.

     
  • Mo DeJong
    Mo DeJong
    2001-02-16

    Patch 36 has been applied, the assertion should
    go away. Since the actual bug lives on I am
    leaving this bug in the open state.

     
  • Eric Blake
    Eric Blake
    2001-02-22

    I am working on the algorithm for correct conversion to strings, but it will probably not make it in the 1.13 release.

     
  • Eric Blake
    Eric Blake
    2001-02-22

    Actually, I'll close this. The first half (assertion failure) is fixed, and the second half (incorrect string) is covered by bug 191.

     
  • Eric Blake
    Eric Blake
    2001-02-22

    • status: open --> open-fixed
     
  • Eric Blake
    Eric Blake
    2001-02-22

    • status: open-fixed --> closed-fixed
     
  • Eric Blake
    Eric Blake
    2001-03-28

    With patch 67, the correct string is now produced.