Home Dashboard Directory Help
Search

inlining code produces bug by ArcaneSeraph


Status: 

Closed
 as Duplicate Help for as Duplicate


1
0
Sign in
to vote
Type: Bug
ID: 581208
Opened: 7/29/2010 3:00:45 PM
Access Restriction: Public
0
Workaround(s)
view
0
User(s) can reproduce this bug

Description

When inlining a constructor for a basic integer vector class, my octree code turns from working properly to either stalling or crashing. I've made a small test project to verify that it isn't anything else and, from what I can tell, it is indeed just the inlining that causes the problem. I have tested this same program on MSVS 2005 and it works under all conditions (inline or not).

Attached is the code (and project files) in question.
Details
Sign in to post a comment.
Posted by Microsoft on 8/5/2010 at 2:33 AM
Thanks for your feedback.

We are rerouting this issue to the appropriate group within the Visual Studio Product Team for triage and resolution. These specialized experts will follow-up with your issue.
Posted by Microsoft on 8/3/2010 at 10:14 PM
Would you please zip your project and Video file and use "FeedbackID-581208" as prefix of the file name.

You can use the following workspace to upload the file:
https://sftus.one.microsoft.com/choosetransfer.aspx?key=3742328a-8d23-46e0-921d-c0c454a3f6a8
Password is X5eRup%anJ
Posted by ArcaneSeraph on 8/3/2010 at 10:03 AM
I have attached a video demonstrating the problem. Hopefully this will help clear things up. It is my guess that the that the project files I sent you had their optimization settings set incorrectly to reproude this bug and that's why you were unable to reproduce it. If that's the case I apologize for not checking that more carefully.

I believe that this problem occurs because of optimization and inlining... perhaps RVO is involved because it would be a case where the compiler could skip the temporary construction of a IVector3. However when this is inlined as well, other values in memory (the variable node_index possibly) seems to be overwritten and goes out of range, causing the crash. If I had more time I would dump the assembly and see exactly what is different but this code represents a hacked up snippet of game code that is due to release shortly and I'm quite busy working on other aspects. For the time being I have bypassed this error by using pragmas to disable inlining for this one function in the game engine itself so there's no rush to fix it, for me.

Although I show the settings I use in the video, I will include the command line for verification here as well:

/Zi /nologo /W3 /WX- /O2 /Ob1 /Oi /Ot /Oy- /GL /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /Gm- /EHsc /MT /GS /Gy /fp:precise /Zc:wchar_t /Zc:forScope /Fp"Release\temp.pch" /Fa"Release\" /Fo"Release\" /Fd"Release\vc100.pdb" /Gd /analyze- /errorReport:queue
Posted by Microsoft on 8/3/2010 at 12:06 AM
Thanks for reporting this issue. We are unable to reproduce the issue with the project you provided.

Please give us a video of this issue so that we can conduct further research.

It would be greatly appreciated if you could provide us with that information as quickly as possible. If we do not hear back from you within 7 days, we will close this issue.

Thanks again for your efforts and we look forward to hearing from you.

Microsoft Visual Studio Connect Support Team
Posted by Microsoft on 7/30/2010 at 5:06 PM
Thank you for your feedback, we are currently reviewing the issue you have submitted. If this issue is urgent, please contact support directly(http://support.microsoft.com)
Sign in to post a workaround.
File Name Submitted By Submitted On File Size  
project.rar (restricted) 7/29/2010 -