RE: [Opengc-devel] Debug-mode failure when built with VC7
Status: Pre-Alpha
Brought to you by:
madmartigan
From: Tim C. <tim...@ge...> - 2004-04-27 14:45:50
|
Steve: The source I am building is straight from CVS. Tim -----Original Message----- From: ope...@li... [mailto:ope...@li...]On Behalf Of Doyle, Steven Sent: Tuesday, April 27, 2004 12:02 AM To: 'ope...@li...' Subject: RE: [Opengc-devel] Debug-mode failure when built with VC7 Hi, Yes I can also confirm this, I don't use the speed tape so it doesn't affect me. I should of mentioned it before . Are what version of OGC are you using ? Cheers Steve -----Original Message----- From: Tim Crews [mailto:tim...@ge...] Sent: 26 April 2004 18:30 To: ope...@li... Subject: [Opengc-devel] Debug-mode failure when built with VC7 Hello: I have been building the OpenGC code under Microsoft Visual Studio .NET (Version 7). I am building the Debug target. When I run it under the debugger, I get frequent run-time error checks saying that the stack frame is corrupted around the variable "buffer". An example of this can be found in ogcBoeing777SpeedTape.cpp, ogcBoeing777SpeedTape::Render, which declares char buffer[1]; and has many lines that look like this: sprintf( buffer, "%i", charSpd/100); Even when the result of (charSpd/100) is one digit, sprintf is null-terminating the string that it is writing to. This is resulting in a desired write to &(Buffer[0]), but also an undesired write to &(Buffer[0])+1. I believe this is what the MSVC debugger is complaining about, since it puts guard data around each variable on the stack, and detects corruption of that guard data. To confirm this, and modified the declaration of Buffer to look like this: char buffer[2]; and modified the sprintf code to look like this: buffer[1] = 255; sprintf( buffer, "%i", charSpd/100); After stepping over the sprintf, sure enough buffer[1] is zero. Tim Crews GECO, Inc Mesa, Arizona, USA ------------------------------------------------------- This SF.net email is sponsored by: The Robotic Monkeys at ThinkGeek For a limited time only, get FREE Ground shipping on all orders of $35 or more. Hurry up and shop folks, this offer expires April 30th! http://www.thinkgeek.com/freeshipping/?cpg=12297 _______________________________________________ Opengc-devel mailing list Ope...@li... https://lists.sourceforge.net/lists/listinfo/opengc-devel ------------------------------------------------------- This SF.net email is sponsored by: The Robotic Monkeys at ThinkGeek For a limited time only, get FREE Ground shipping on all orders of $35 or more. Hurry up and shop folks, this offer expires April 30th! http://www.thinkgeek.com/freeshipping/?cpg=12297 _______________________________________________ Opengc-devel mailing list Ope...@li... https://lists.sourceforge.net/lists/listinfo/opengc-devel |