New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
VBC crash in Double to Decimal conversion #7148
Comments
Note that this fails too:
It's the second line that causes the crash, so it seems that the actual problem is the conversion from Double to Decimal -- Integer has nothing to do with it. I'm renaming the issue appropriately. We will want to get a fix out for this quickly. |
The immediate issue is occurring in the stack scheduler Return top.Item2 = If(Not local.IsByRef, ExprContext.Value, ExprContext.Address) AndAlso
top.Item1.Kind = BoundKind.Local AndAlso
DirectCast(top.Item1, BoundLocal).LocalSymbol = local In this scenario PushEvalStack(Nothing, ExprContext.Address) |
…uler optimizations. Fixes dotnet#7148.
…uler optimizations. Fixes dotnet#7148.
After digging into the issue here we determined it will reproduce under the following circumstance:
|
@agocke Please verify. |
Add unit-test with array element for #7148.
For anyone effected by this bug you can work around it by doing the following:
That will install a patched version of the compiler. |
I just ran into this today. Will try installing the patched version to see if that fixes it. edit: Hmm, not quite. Here's what I get now:
Just going to use VS2013 as a workaround for now, this isn't even a project my team works on, I'm working on something else and it depends on this project... so I don't have time to fiddle around. |
@kamranayub do you have a solution you can share out so we can look into this? We've been able to verify that particular bug is fixed in that NuGet (manual testing and customer machines). I'ts possible you are running into a different problem. |
The project I ran into for this isn't a primary thing I work with and I On Wed, Dec 9, 2015, 12:38 Jared Parsons notifications@github.com wrote:
|
(MattGe posting from BHarry blog. Please verify in C# code as well.)
Hi Brian - I found a potential serious regression in VS2015 Update 1 when it comes to VB. It took me 2 hours of commenting out huge pieces of our codebase until I narrowed it down to one line of code that trips up vbc.exe. If I paste the rotation code directly into Sub Main, it works. If I make rotation local to CalculateDimensions, it works. But if I craft the code as follows, it causes a compiler error. All you have to do is make a VB 'Console Application'. Doesn't matter which version of .NET you target (4, 4.5, 4.5.1, 4.6, 4.6.1). I suspect others will run into something similar. It's like a needle in the haystack finding the culprit. Not sure who I should notify about this.
(MattGe: Workaround is to change 180 to 180.0 in the example above, indicating a problem with integer conversion in the compiler.)
The text was updated successfully, but these errors were encountered: