bugKawa - Bugs: bug #18105, with-syntax causes...

 
 

bug #18105: with-syntax causes NullPointerException during compilation but not in repl

Submitted by:  Chris Wegrzyn <cwegrzyn>
Submitted on:  Wed 25 Oct 2006 01:59:59 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.

 

Tue 12 Dec 2006 08:08:24 AM UTC, comment #2:

Sorry for letting this one drop. I checked in the patch
and the test-case. Thanks!
I was concerned about rewriting the input form in the context of the syntax-case-generated LetExp, sincde logically it isn't in the syntax-case's scope. However, since the 2 declarations in that LextExp are both unnamed, it's fine.

Per Bothner <bothner>
Project AdministratorIn charge of this item.
Wed 25 Oct 2006 04:54:46 PM UTC, comment #1:

As an update, this appears to be a problem that results from having a let expression inside of the first argument to syntax-case (which is the result of expanding with-syntax). I have attached a simplified test that exhibits this. I tracked the exception to two nested calls of LetExp.apply(CallContext) which both have level == 4. This causes evalFrames to be trashed.

The attached patch reorders syntax-case to rewrite the first argument to syntax-case within the scope of the let statement, rather than before it. I'm not sure whether the call to getLiteralsList should occur outside of that scope, but it hasn't caused any problems for me yet.

Chris Wegrzyn <cwegrzyn>
Wed 25 Oct 2006 01:59:59 PM UTC, original submission:

A simple syntax-case expression involving a trivial with-syntax causes the compiler (kawa.repl -C) to raise a NullPointerException. However, when the same code is executed with kawa.repl -f, it behaves as expected (and verified in mzscheme).

An example case is attached to the report. When executed with -f, it should display 33. When executed with -C, it will cause a NullPointerException during compilation.

Chris Wegrzyn <cwegrzyn>

 

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

Attach File(s):
   
   
Comment:
   

Attached Files
file #11064:  syntax-case-crash.patch added by cwegrzyn (3KiB - application/octet-stream - patch for syntax_case.java)
file #11063:  syntax-case-crash-2.scm added by cwegrzyn (143B - application/octet-stream - new test case)
file #11062:  syntax-case-crash.scm added by cwegrzyn (424B - application/octet-stream - test case)

 

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)
  •  

    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
    Tue 12 Dec 2006 08:08:24 AM UTCbothnerStatusNone=>Fixed
      Assigned toNone=>bothner
      Open/ClosedOpen=>Closed
    Wed 25 Oct 2006 04:55:07 PM UTCcwegrzynAttached File-=>Added syntax-case-crash.patch, #11064
    Wed 25 Oct 2006 04:54:46 PM UTCcwegrzynAttached File-=>Added syntax-case-crash-2.scm, #11063
    Wed 25 Oct 2006 01:59:59 PM UTCcwegrzynAttached File-=>Added syntax-case-crash.scm, #11062

    Back to the top


    Powered by Savane 3.1-cleanup1