https://bugzilla.novell.com/show_bug.cgi?id=435494


           Summary: Parsing error "can't seek that far back" when parsing
                    function call with many arguments
           Product: Mono: Compilers
           Version: 1.9
          Platform: Other
        OS/Version: Ubuntu
            Status: NEW
          Severity: Critical
          Priority: P5 - None
         Component: C#
        AssignedTo: mono-bugs@lists.ximian.com
        ReportedBy: [EMAIL PROTECTED]
         QAContact: mono-bugs@lists.ximian.com
          Found By: Community User


Created an attachment (id=245557)
 --> (https://bugzilla.novell.com/attachment.cgi?id=245557)
Code sample exhibiting error

Description of Problem:

Compilation of my project fails with a parsing error, even though there is no
error in the source file. I have attached an excerpt of my source file which
exhibits this when parsed from the command line.

Steps to reproduce the problem:
1. Execute the following command on attached mono_bug.cs:
$ MONO_OPTIONS="--debug" gmcs -v --parse mono_bug.cs


Actual Results:
Parsing fails with the following error:

/path/to/mono_bug.cs(47,70): error CS8025: Parsing error
Mono.CSharp.InternalErrorException: can't seek that far back: 1870
  at Mono.CSharp.SeekableStreamReader.set_Position (Int32 value) [0x0004a] in
/build/buildd/mono-1.9.1+dfsg/mcs/mcs/support.cs:464 
  at Mono.CSharp.Tokenizer.PopPosition () [0x00011] in
/build/buildd/mono-1.9.1+dfsg/mcs/mcs/cs-tokenizer.cs:272 
  at Mono.CSharp.Tokenizer.is_punct (Char c, System.Boolean& doread) [0x000d6]
in /build/buildd/mono-1.9.1+dfsg/mcs/mcs/cs-tokenizer.cs:732 
  at Mono.CSharp.Tokenizer.xtoken () [0x002f3] in
/build/buildd/mono-1.9.1+dfsg/mcs/mcs/cs-tokenizer.cs:2440 
  at Mono.CSharp.Tokenizer.token () [0x00000] in
/build/buildd/mono-1.9.1+dfsg/mcs/mcs/cs-tokenizer.cs:1527 
  at Mono.CSharp.CSharpParser.yyparse (yyInput yyLex) [0x000c3] in
/build/buildd/mono-1.9.1+dfsg/mcs/mcs/cs-parser.cs:1143 
  at Mono.CSharp.CSharpParser.parse () [0x00028] in
/build/buildd/mono-1.9.1+dfsg/mcs/mcs/cs-parser.jay:5949 
Compilation failed: 1 error(s), 0 warnings


Expected Results:
Parsing completes successfully.

How often does this happen? 
Every time.

Additional Information:
This occurs with the following mono versions:

$ mono --version
Mono JIT compiler version 1.9.1 (tarball)
Copyright (C) 2002-2007 Novell, Inc and Contributors. www.mono-project.com
        TLS:           __thread
        GC:            Included Boehm (with typed GC)
        SIGSEGV:       altstack
        Notifications: epoll
        Architecture:  x86
        Disabled:      none
$ gmcs --version
Mono C# compiler version 1.9.1.0

Mono was installed on Ubuntu from the directhex.mfgames.com repository:
deb http://directhex.mfgames.com/ hardy main

I tested this same example file on Mono 1.2.6 on Ubuntu and could not reproduce
the error. I did not test with the most recent SVN.


-- 
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.
_______________________________________________
mono-bugs maillist  -  mono-bugs@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-bugs

Reply via email to