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: [email protected]
ReportedBy: [EMAIL PROTECTED]
QAContact: [email protected]
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.
_______________________________________________
mono-bugs maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-bugs