本文介绍了如何结束一个指向0xCCCCCCCC的指针的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在处理崩溃的程序有时尝试读取地址 0xCCCCCCCC 的数据。 Google(和StackOverflow)是我的朋友,我看到它是未初始化的堆栈变量的MSVC调试代码。为了理解问题来自哪里,我试图重现这种行为:问题是我不能这样做。



问题是:你有一个代码显示指针如何结束指向 0xCCCCCCCC



谢谢。

解决方案

使用或。请确保也用于禁用任何优化。 / p>


The program I'm working on crashes sometimes trying to read data at the address 0xCCCCCCCC. Google (and StackOverflow) being my friends I saw that it's the MSVC debug code for uninitialized stack variable. To understand where the problem can come from, I tried to reproduce this behavior: problem is I haven't been able to do it.

Question is: have you a code snippet showing how a pointer can end pointing to 0xCCCCCCCC?

Thanks.

解决方案

Compile your code with the /GZ compiler switch or /RTCs switch. Make sure that /Od switch is also used to disable any optimizations.

这篇关于如何结束一个指向0xCCCCCCCC的指针的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-16 07:24