bugKawa - Bugs: bug #40077, Boolean logical `not` on float...

 
 

bug #40077: Boolean logical `not` on float number can result in ClassCastException

Submitted by:  Matthieu Vachon <maoueh>
Submitted on:  Sat 21 Sep 2013 05:55:26 AM UTC  
 
Category: NoneSeverity: 3 - Normal
Item Group: NoneStatus: Fixed
Privacy: PublicAssigned to: Per Bothner <bothner>
Open/Closed: Closed

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Tue 24 Sep 2013 02:07:10 AM UTC, comment #2:

I checked in fix and testcase - thanks.

This wasn't very obvious. The problem was not the floating-point number, but that eqv? had the wrong return type: the generic Type.booleanType rather than the Scheme-appropriate Scheme.booleanType. Both are represented by a primitive boolean at run-time, but the latter handles Scheme "boolean-value" conversion. The wrong type for eqv? causes the wrong return type for repeat? to inferred, which then lead to the faulty runtime cast.

Per Bothner <bothner>
Project AdministratorIn charge of this item.
Sat 21 Sep 2013 06:01:38 AM UTC, comment #1:

Sorry, I thought I could guess next Savannah bug id but I was wrong :)

Attached an updated patch with the right savannah bug id.

Regards,
Matt

(file #29190)

Matthieu Vachon <maoueh>
Sat 21 Sep 2013 05:55:26 AM UTC, original submission:

Consider the following snippet of code:

This will correctly print "#f" as we would expect. However, when this code is used within a function an return a result, the code results in a ClassCastException cannot convert DFloNum to Boolean.

The snippet above will fail with this exception:

I attached a patch that adds a failing testcase to Kawa about this bug.

Regards,
Matt

Matthieu Vachon <maoueh>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

Attached Files
file #29190:  feature-sva40077-testcase.patch added by maoueh (2KiB - application/octet-stream)
file #29189:  feature-sva39949-testcase.patch added by maoueh (2KiB - application/octet-stream)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by bothner (Posted a comment)
  • -unavailable- added by maoueh (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 5 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Tue 24 Sep 2013 02:07:10 AM UTCbothnerStatusNone=>Fixed
      Assigned toNone=>bothner
      Open/ClosedOpen=>Closed
    Sat 21 Sep 2013 06:01:38 AM UTCmaouehAttached File-=>Added feature-sva40077-testcase.patch, #29190
    Sat 21 Sep 2013 05:55:26 AM UTCmaouehAttached File-=>Added feature-sva39949-testcase.patch, #29189

    Back to the top


    Powered by Savane 3.1-cleanup1