Undefined behavior is idiomatic to C and C++ programming; such behavior is a use of an erroneous program construct for which the languages impose no requirements, such as integer overflows. The paper presents an empirical experiment seeking to probe the extent of undefined behavior executing underneath typical desktop use of a Linux distribution. The analysis is based on an undefined behavior sanitizer implemented in a compiler. According to the results, undefined behavior is common. By completing 59 simple experimental tasks, nearly 11 thousand unique undefined behavior warnings were generated by 32 unique programs and libraries written in C or C++. Of these warnings, most were associated with the Mesa graphics library and generated by interacting with graphical user interfaces. Merely logging into the GNOME desktop environment generated over 500 unique warnings. Of all warnings, the clear majority was about virtual table pointers. The associated stack traces were also lengthy in general. With these and other results, the paper contributes to the empirical literature on C and C++.


翻译:未定义行为是C与C++编程中的习语性特征;此类行为指使用了语言未作任何要求的错误程序构造,例如整数溢出。本文通过一项实证实验,试图探究Linux发行版典型桌面使用过程中底层执行的未定义行为范围。该分析基于编译器中实现的未定义行为检测器。结果显示,未定义行为相当普遍。通过完成59个简单实验任务,由32个用C或C++编写的程序及库产生了近11000条独特的未定义行为警告。其中,多数警告与Mesa图形库相关,且通过交互图形用户界面产生。仅登录GNOME桌面环境就生成了超过500条独特警告。在所有警告中,绝大多数涉及虚表指针。相关的堆栈回溯通常也较长。结合这些及其他结果,本文为关于C与C++的实证文献做出了贡献。

0
下载
关闭预览

相关内容

CASES:International Conference on Compilers, Architectures, and Synthesis for Embedded Systems。 Explanation:嵌入式系统编译器、体系结构和综合国际会议。 Publisher:ACM。 SIT: http://dblp.uni-trier.de/db/conf/cases/index.html
【2023新书】Objective-C:终极指南, 341页pdf
专知会员服务
25+阅读 · 2023年7月21日
【2022新书】流畅C语言:原理,实践与模式,427页pdf
专知会员服务
76+阅读 · 2022年10月28日
专知会员服务
24+阅读 · 2021年6月19日
【干货书】C++实战编程指南,附549页pdf与Slides
专知会员服务
84+阅读 · 2021年4月23日
【2020新书】懒人程序员专用书C++20,681页pdf
专知会员服务
46+阅读 · 2020年12月15日
Effective.Modern.C++ 中英文版,334页pdf
专知会员服务
70+阅读 · 2020年11月4日
专知会员服务
82+阅读 · 2020年9月28日
【Google】无监督机器翻译,Unsupervised Machine Translation
专知会员服务
36+阅读 · 2020年3月3日
Effective.Modern.C++ 中英文版,334页pdf
专知
26+阅读 · 2020年11月4日
浅谈主动学习(Active Learning)
凡人机器学习
32+阅读 · 2020年6月18日
论文浅尝 | Zero-Shot Transfer Learning for Event Extraction
开放知识图谱
26+阅读 · 2018年11月1日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
VIP会员
最新内容
战力倍增器:自主武器系统与乌克兰及加沙冲突
专知会员服务
1+阅读 · 今天15:24
人工智能赋能战场情报:提速决策进程
专知会员服务
0+阅读 · 今天15:15
《拥抱新兴技术:面向未来军官的教育革新》
专知会员服务
2+阅读 · 今天15:11
《无人地面战车(UGV)的崛起》报告
专知会员服务
7+阅读 · 7月16日
美陆军任务式指挥人工智能解决方案
专知会员服务
11+阅读 · 7月16日
相关VIP内容
【2023新书】Objective-C:终极指南, 341页pdf
专知会员服务
25+阅读 · 2023年7月21日
【2022新书】流畅C语言:原理,实践与模式,427页pdf
专知会员服务
76+阅读 · 2022年10月28日
专知会员服务
24+阅读 · 2021年6月19日
【干货书】C++实战编程指南,附549页pdf与Slides
专知会员服务
84+阅读 · 2021年4月23日
【2020新书】懒人程序员专用书C++20,681页pdf
专知会员服务
46+阅读 · 2020年12月15日
Effective.Modern.C++ 中英文版,334页pdf
专知会员服务
70+阅读 · 2020年11月4日
专知会员服务
82+阅读 · 2020年9月28日
【Google】无监督机器翻译,Unsupervised Machine Translation
专知会员服务
36+阅读 · 2020年3月3日
相关基金
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
Top
微信扫码咨询专知VIP会员