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

 
 

bug #39229: Empty string symbol lexer problem

Submitter:  Matthieu Vachon <maoueh>
Submitted:  Tue 11 Jun 2013 01:48:14 PM UTC
   
 
Category:  Scheme language Severity:  3 - Normal
Item Group:  Compile-time exception Status:  Fixed
Privacy:  Public Assigned to:  bothner
Open/Closed:  Closed
* Mandatory Fields

Add a New Comment Rich Markup
   

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>
Group administrator
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 Files:
   
   
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
  • -email is unavailable- added by bothner (Posted a comment)
  • -email is unavailable- added by maoueh (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 6 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2013-06-12 bothner Open/ClosedOpen Closed
    2013-06-12 bothner CategoryNone Scheme language
        Item GroupNone Compile-time exception
        StatusNone Fixed
        Assigned toNone bothner
    2013-06-11 maoueh Attached File- Added fix-bug-#39229.patch, #28294

    Back to the top

    Powered by Savane 3.13-4b48.
    Corresponding source code