Release-mode only bug

Started by
3 comments, last by DaBookshah 17 years, 1 month ago
Well, I'm trying to make my program work in release mode. Slight problem - the code generated in release mode appears to be nonsense (Not saying it's not my fault). Case in point:

for(vector<Pillar*>::const_iterator j = Pillars->begin(); j != Pillars->end(); j++)
{
   ..
}


Specifically, the code generated for the start of the for loop. In debug mode it works fine. begin() end() != In release mode it results in: call to begin() call to end() call to _Vector_const_iterator += 0x0012e8ac (pointer to stack address?). EDIT: Obviously, my vector is not that big, which causes an exception. I don't get it. [Edited by - DaBookshah on April 13, 2007 12:15:32 AM]
Advertisement
What is the problem you are experiencing?

Dave
Incrementing a vector by 0x0012e8ac is invalid (my vector only has a few elements).
What compiler are you using?
Oh is this still here.....thought I deleted it. Visual Studio 8 compiler. Anyway, narrowed it down somewhat. After fiddling with the optimization settings, I ended up with a different problem. I hadn't considered that the actual assembly generated could be screwed up, but when I looked at it I found a call 00400000 instruction. That's right, a static call into the PE header, not a dynamic one. So I'm pretty much out of ideas.

This topic is closed to new replies.

Advertisement