bugKawa - Bugs: bug #39229, Empty string symbol lexer problem

 
 

bug #39229: Empty string symbol lexer problem

Submitted by:  Matthieu Vachon <maoueh>
Submitted on:  Tue 11 Jun 2013 01:48:14 PM UTC  
 
Category: Scheme languageSeverity: 3 - Normal
Item Group: Compile-time exceptionStatus: 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.

 

Wed 12 Jun 2013 08:13:38 PM UTC, comment #2:

Thanks. Fixed and checked in.

Note there were two buglets in the test-case:
(1) It should be (format #t ...) not (format #f ...).
(2) The format string should end with ~% so we end with a newline.

Per Bothner <bothner>
Project AdministratorIn charge of this item.
Tue 11 Jun 2013 01:55:11 PM UTC, comment #1:

Added patch for this bug.

(file #28294)

Matthieu Vachon <maoueh>
Tue 11 Jun 2013 01:48:14 PM UTC, original submission:

The following piece of code does not compile (exception raised at the lexer level):

(equal? '|| (string->symbol ""))

This was compiling before. Sure it's not a common use case but we had used it in the past to directly <String> object (symbol was <String> at that time).

I changed it in my code base but thought it would be good to solve it.

Problem comes from the `packageManager == endPos - 1` condition. When symbol is the empty string, packagerManager is -1 and endPos is 0 (-1 == 0 - 1).

I will post a fix shortly.

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 #28294:  fix-bug-#39229.patch added by maoueh (2KiB - application/octet-stream - Patch for the bug)

 

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 6 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Wed 12 Jun 2013 08:49:48 PM UTCbothnerOpen/ClosedOpen=>Closed
    Wed 12 Jun 2013 08:13:38 PM UTCbothnerCategoryNone=>Scheme language
      Item GroupNone=>Compile-time exception
      StatusNone=>Fixed
      Assigned toNone=>bothner
    Tue 11 Jun 2013 01:55:11 PM UTCmaouehAttached File-=>Added fix-bug-#39229.patch, #28294

    Back to the top


    Powered by Savane 3.1-cleanup1