Stack-based buffer overrun on Windows RT (ARM)


  • Hi,

    I'm develop an Windows Store APP on Windows RT (ARM) platform.

    I run into a problem that when I use debug build, there's no any exception of my app, even if I didn't attach to VS2012.

    But when I use release build, VS2012 shows the following exception:

    "Stack cookie instrumentation code detected a stack-based buffer overrun."

    And it just break at a point without any problem (that line is void function return).

    My question is:

    1. What can be the root cause of this exception?

       1-1 Does is mean there are some buffer(s) I didn't correctly initialize/allocate, but somehow my debug compile setting or debug library does it for me?

       1-2 Is there any rules or guidelines when developing Windows RT programs in C++? Like structure size or buffer size limit?

    Tuesday, March 19, 2013 9:10 AM


All replies

  • Deleted
    Tuesday, March 19, 2013 10:02 AM
  • Hi Bill,

    I check all project I used and all of them have turned on /GS setting in debug configuration.

    I think root cause will be another reason.

    Still thanks for you information very much!

    • Edited by truckwu Wednesday, March 20, 2013 4:14 AM Description not clear
    Wednesday, March 20, 2013 4:07 AM
  • Hello,

    Would you please provide us the whole codes to reproduce this issue,

    You can upload your project to SkyDrive

    It is not necessary that you send out the whole of your project. We just need a simplest sample to reproduce the problem. You can remove any confidential information or business details from it.

    If you don't want to upload the sample code, you can try to get the paid support from https://getsupport.microsoft.com/

    Best regards,

    Jesse Jiang
    MSDN Community Support | Feedback to us
    Develop and promote your apps in Windows Store
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Thursday, March 21, 2013 3:14 AM
  • Here is some additional information.  Possibly you could try and simplify the code and see if the problem still occurs.  You might find the overrun that way.


    Best Wishes - Eric

    This posting is provided "AS IS" with no warranties, and confers no rights.

    Monday, April 8, 2013 10:44 PM