[Mono-bugs] [Bug 397068] New: Invalid code causes mcs throw an exception

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Wed Jun 4 09:15:20 EDT 2008


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


           Summary: Invalid code causes mcs throw an exception
           Product: Mono: Compilers
           Version: SVN
          Platform: Other
        OS/Version: Other
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: C#
        AssignedTo: mono-bugs at lists.ximian.com
        ReportedBy: mhabersack at novell.com
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---


The (invalid) code shown below:

internal static bool HasSessionId (string path)
{
        if (path == null || path.Length < 5)
                return false;

        return (path.StartsWith ("/(") == 0 && path.IndexOf ("/)") > 2);
}

breaks mcs in the following way:

Exception caught by the compiler while compiling:
   Block that caused the problem begin at: System.Web.Util/UrlUtils.cs(76,38):
                     Block being compiled:
[System.Web.Util/UrlUtils.cs(77,17):,System.Web.Util/UrlUtils.cs(82,17):]
Mono.CSharp.InternalErrorException: Invalid conversion
Internal compiler error at System.Web.Util/UrlUtils.cs(76,38):: exception
caught while emitting MethodBuilder [UrlUtils::HasSessionId]

Unhandled Exception: Mono.CSharp.InternalErrorException: Invalid conversion
  at Mono.CSharp.Binary.DoResolveCore (Mono.CSharp.EmitContext ec,
Mono.CSharp.Expression left_orig, Mono.CSharp.Expression right_orig) [0x00000] 
  at Mono.CSharp.Binary.DoResolve (Mono.CSharp.EmitContext ec) [0x00000] 
  at Mono.CSharp.Expression.Resolve (Mono.CSharp.EmitContext ec, ResolveFlags
flags) [0x00000] 
  at Mono.CSharp.Expression.Resolve (Mono.CSharp.EmitContext ec) [0x00000] 
  at Mono.CSharp.Binary.DoResolve (Mono.CSharp.EmitContext ec) [0x00000] 
  at Mono.CSharp.Expression.Resolve (Mono.CSharp.EmitContext ec, ResolveFlags
flags) [0x00000] 
  at Mono.CSharp.Expression.Resolve (Mono.CSharp.EmitContext ec) [0x00000] 
  at Mono.CSharp.Return.DoResolve (Mono.CSharp.EmitContext ec) [0x00000] 
  at Mono.CSharp.ExitStatement.Resolve (Mono.CSharp.EmitContext ec) [0x00000] 
  at Mono.CSharp.Block.Resolve (Mono.CSharp.EmitContext ec) [0x00000] 
  at Mono.CSharp.EmitContext.ResolveTopBlock (Mono.CSharp.EmitContext
anonymous_method_host, Mono.CSharp.ToplevelBlock block, Mono.CSharp.Parameters
ip, IMethodData md, System.Boolean& unreachable) [0x00000]


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