Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
Already on GitHub? Sign in to your account
VBC crash in Double to Decimal conversion #7148
Comments
MattGertz
assigned
gafter
Dec 1, 2015
MattGertz
added this to the 1.2 milestone
Dec 1, 2015
MattGertz
changed the title from
VBC crash in Integer conversion
to
VBC crash in Double to Decimal conversion
Dec 1, 2015
|
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. |
jaredpar
assigned
AlekseyTs
and unassigned
gafter
Dec 1, 2015
|
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 = localIn this scenario PushEvalStack(Nothing, ExprContext.Address) |
AlekseyTs
added
the
3 - Working
label
Dec 1, 2015
AlekseyTs
added a commit
to AlekseyTs/roslyn
that referenced
this issue
Dec 1, 2015
AlekseyTs
referenced this issue
Dec 1, 2015
Closed
Use ExprContext.None for fake stack slots used to disable stack scheduler optimizations. #7160
AlekseyTs
added
4 - In Review
and removed
3 - Working
labels
Dec 1, 2015
AlekseyTs
added a commit
to AlekseyTs/roslyn
that referenced
this issue
Dec 2, 2015
AlekseyTs
referenced this issue
Dec 2, 2015
Merged
Use ExprContext.None for fake stack slots used to disable stack scheduler optimizations. #7172
|
After digging into the issue here we determined it will reproduce under the following circumstance:
|
AlekseyTs
added
Resolution-Fixed
and removed
4 - In Review
labels
Dec 2, 2015
|
@agocke Please verify. |
AlekseyTs
closed this
Dec 2, 2015
AlekseyTs
assigned
agocke
and unassigned
AlekseyTs
Dec 2, 2015
AlekseyTs
added a commit
to AlekseyTs/roslyn
that referenced
this issue
Dec 2, 2015
AlekseyTs
referenced this issue
Dec 2, 2015
Merged
Add unit-test with array element for #7148. #7189
AlekseyTs
added a commit
that referenced
this issue
Dec 2, 2015
|
For anyone effected by this bug you can work around it by doing the following:
That will install a patched version of the compiler. |
kamranayub
commented
Dec 4, 2015
|
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. |
kamranayub
commented
Dec 9, 2015
|
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:
|
MattGertz commentedDec 1, 2015
(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.)