当前位置:网站首页>栈区中越界可能造成的死循环可能
栈区中越界可能造成的死循环可能
2022-08-05 05:17:00 【游辞】
#include <stdio.h>
int main()
{
int i = 0;
int arr[] = {1,2,3,4,5,6,7,8,9,10};
for(i=0; i<=12; i++)
{
arr[i] = 0;
printf("会死循环哦\n");
}
return 0;
}
知识点
- 栈区内存使用习惯是先使用高地址处的空间,再使用低地址的空间。
- 数组随着下标的增长地址是由低到高变化的。
- 如果和数组arr有一定的空间,但是利用数组越界的操作有可能会覆盖到i,这种情况就会出现死循环
图解
边栏推荐
- 物联网:LoRa无线通信技术
- 电子产品量产工具(3)- 文字系统实现
- [Intensive reading of the paper] R-CNN's Bounding box regression problem is detailed
- 全尺度表示的上下文非局部对齐
- CVPR2021 - Inception Convolution with Efficient Dilation Search
- tensorflow的session和内存溢出
- leetCode刷题之第31题
- Redis设计与实现(第一部分):数据结构与对象
- [Pytorch study notes] 10. How to quickly create your own Dataset dataset object (inherit the Dataset class and override the corresponding method)
- LeetCode刷题之第86题
猜你喜欢
电子产品量产工具(2)- 输入系统实现
Detailed explanation of BroadCast Receiver (broadcast)
IJCAI 2022|边界引导的伪装目标检测模型BGNet
C语言入门笔记 —— 函数(1)
九、响应处理——内容协商底层原理
Redis设计与实现(第一部分):数据结构与对象
[Pytorch study notes] 10. How to quickly create your own Dataset dataset object (inherit the Dataset class and override the corresponding method)
PID详解
LeetCode刷题之第530题
【shell编程】第三章:函数
随机推荐
网络信息安全运营方法论 (上)
MaskDistill - Semantic segmentation without labeled data
伪RTOS-ProroThread在CH573芯片上的移植
电子产品量产工具(4)-UI系统实现
tensorflow的session和内存溢出
亲身实感十多年的面试官面试的题目
Thread handler handle IntentServvice handlerThread
Service
C语言联合体union占用空间大小问题
【ts】typescript高阶:条件类型与infer
【ts】typescript高阶:键值类型及type与interface区别
LeetCode刷题之第24题
LeetCode刷题之第530题
关于存储IOPS你必须了解的概念
盘点关于发顶会顶刊论文,你需要知道写作上的这些事情!
五、请求处理—Rest映射是怎样实现的?
CVPR 2020 - 频谱正则化
【Pytorch学习笔记】9.分类器的分类结果如何评估——使用混淆矩阵、F1-score、ROC曲线、PR曲线等(以Softmax二分类为例)
【Promise高级用法】实现并行和串行API
dataframe 常用操作