[Mono-bugs] [Bug 435494] New: Parsing error "can't seek that far back" when parsing function call with many arguments

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Tue Oct 14 23:05:46 EDT 2008


           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 at lists.ximian.com
        ReportedBy: mmazur at gmail.com
         QAContact: mono-bugs at 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
  at Mono.CSharp.Tokenizer.PopPosition () [0x00011] in
  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
  at Mono.CSharp.Tokenizer.token () [0x00000] in
  at Mono.CSharp.CSharpParser.yyparse (yyInput yyLex) [0x000c3] in
  at Mono.CSharp.CSharpParser.parse () [0x00028] in
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

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.

More information about the mono-bugs mailing list