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

 
 

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

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

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

    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
    2006-12-12 bothner StatusNone Fixed
        Assigned toNone bothner
        Open/ClosedOpen Closed
    2006-10-25 cwegrzyn Attached File- Added syntax-case-crash.patch, #11064
    2006-10-25 cwegrzyn Attached File- Added syntax-case-crash-2.scm, #11063
    2006-10-25 cwegrzyn Attached File- Added syntax-case-crash.scm, #11062

    Back to the top

    Powered by Savane 3.13-4b48.
    Corresponding source code