用于静态生命周期分析的c++类分类

G. Horváth, Norbert Pataki
{"title":"用于静态生命周期分析的c++类分类","authors":"G. Horváth, Norbert Pataki","doi":"10.1145/3351556.3351559","DOIUrl":null,"url":null,"abstract":"While C++ is a powerful language, it has many subtle ways to introduce object lifetime-related errors. According to Microsoft, 70% of their security patches are fixing memory issues. Thus, it is crucial to develop safety measures to counteract these problems. Static analysis is an essential approach to detect runtime errors by analyzing the source code without executing it. One of the reasons why is it so easy to make mistakes using C++ is that the language provides a rich taxonomy of object lifetime-related concepts such as containers, values, iterators, raw pointers, lvalue and rvalue references, smart pointers, etc. The behavior of user-defined types depends on their category. Classical static analysis approaches treat user-defined types as black boxes and do not reason about their correctness. In this paper, we argue for an approach that infers the category of user-defined types and leverages this information during analysis. To achieve this goal we first analyze user-defined classes to predict their ownership semantics. Then we use this information to generalize existing static analysis methods. We evaluated the proposed method on large open source projects.","PeriodicalId":126836,"journal":{"name":"Proceedings of the 9th Balkan Conference on Informatics","volume":"19 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2019-09-26","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"1","resultStr":"{\"title\":\"Categorization of C++ Classes for Static Lifetime Analysis\",\"authors\":\"G. Horváth, Norbert Pataki\",\"doi\":\"10.1145/3351556.3351559\",\"DOIUrl\":null,\"url\":null,\"abstract\":\"While C++ is a powerful language, it has many subtle ways to introduce object lifetime-related errors. According to Microsoft, 70% of their security patches are fixing memory issues. Thus, it is crucial to develop safety measures to counteract these problems. Static analysis is an essential approach to detect runtime errors by analyzing the source code without executing it. One of the reasons why is it so easy to make mistakes using C++ is that the language provides a rich taxonomy of object lifetime-related concepts such as containers, values, iterators, raw pointers, lvalue and rvalue references, smart pointers, etc. The behavior of user-defined types depends on their category. Classical static analysis approaches treat user-defined types as black boxes and do not reason about their correctness. In this paper, we argue for an approach that infers the category of user-defined types and leverages this information during analysis. To achieve this goal we first analyze user-defined classes to predict their ownership semantics. Then we use this information to generalize existing static analysis methods. We evaluated the proposed method on large open source projects.\",\"PeriodicalId\":126836,\"journal\":{\"name\":\"Proceedings of the 9th Balkan Conference on Informatics\",\"volume\":\"19 1\",\"pages\":\"0\"},\"PeriodicalIF\":0.0000,\"publicationDate\":\"2019-09-26\",\"publicationTypes\":\"Journal Article\",\"fieldsOfStudy\":null,\"isOpenAccess\":false,\"openAccessPdf\":\"\",\"citationCount\":\"1\",\"resultStr\":null,\"platform\":\"Semanticscholar\",\"paperid\":null,\"PeriodicalName\":\"Proceedings of the 9th Balkan Conference on Informatics\",\"FirstCategoryId\":\"1085\",\"ListUrlMain\":\"https://doi.org/10.1145/3351556.3351559\",\"RegionNum\":0,\"RegionCategory\":null,\"ArticlePicture\":[],\"TitleCN\":null,\"AbstractTextCN\":null,\"PMCID\":null,\"EPubDate\":\"\",\"PubModel\":\"\",\"JCR\":\"\",\"JCRName\":\"\",\"Score\":null,\"Total\":0}","platform":"Semanticscholar","paperid":null,"PeriodicalName":"Proceedings of the 9th Balkan Conference on Informatics","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1145/3351556.3351559","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 1

摘要

虽然c++是一门功能强大的语言,但它有许多微妙的方式来引入与对象生命周期相关的错误。据微软称,他们70%的安全补丁都是用来修复内存问题的。因此,制定安全措施来应对这些问题至关重要。静态分析是通过分析源代码而不执行它来检测运行时错误的基本方法。使用c++很容易出错的原因之一是,c++语言提供了丰富的对象生命周期相关概念分类,如容器、值、迭代器、原始指针、左值和右值引用、智能指针等。用户定义类型的行为取决于它们的类别。经典的静态分析方法将用户定义的类型视为黑盒,不会对其正确性进行推理。在本文中,我们论证了一种推断用户定义类型的类别并在分析期间利用该信息的方法。为了实现这个目标,我们首先分析用户定义的类来预测它们的所有权语义。然后利用这些信息来推广现有的静态分析方法。我们在大型开源项目中评估了所提出的方法。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
查看原文
分享 分享
微信好友 朋友圈 QQ好友 复制链接
本刊更多论文
Categorization of C++ Classes for Static Lifetime Analysis
While C++ is a powerful language, it has many subtle ways to introduce object lifetime-related errors. According to Microsoft, 70% of their security patches are fixing memory issues. Thus, it is crucial to develop safety measures to counteract these problems. Static analysis is an essential approach to detect runtime errors by analyzing the source code without executing it. One of the reasons why is it so easy to make mistakes using C++ is that the language provides a rich taxonomy of object lifetime-related concepts such as containers, values, iterators, raw pointers, lvalue and rvalue references, smart pointers, etc. The behavior of user-defined types depends on their category. Classical static analysis approaches treat user-defined types as black boxes and do not reason about their correctness. In this paper, we argue for an approach that infers the category of user-defined types and leverages this information during analysis. To achieve this goal we first analyze user-defined classes to predict their ownership semantics. Then we use this information to generalize existing static analysis methods. We evaluated the proposed method on large open source projects.
求助全文
通过发布文献求助,成功后即可免费获取论文全文。 去求助
来源期刊
自引率
0.00%
发文量
0
期刊最新文献
Categorization of C++ Classes for Static Lifetime Analysis Trends Review of the Contemporary Security Problems in the Cyberspace Can a robot be an efficient mediator in promoting dyadic activities among children with Autism Spectrum Disorders and children of Typical Development? Complexity Aspects of Unstructured Sparse Graph Representation Female Students' Attitude Towards Studying Informatics and Expectations for Future Career - Balkan Case
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
现在去查看 取消
×
提示
确定
0
微信
客服QQ
Book学术公众号 扫码关注我们
反馈
×
意见反馈
请填写您的意见或建议
请填写您的手机或邮箱
已复制链接
已复制链接
快去分享给好友吧!
我知道了
×
扫码分享
扫码分享
Book学术官方微信
Book学术文献互助
Book学术文献互助群
群 号:481959085
Book学术
文献互助 智能选刊 最新文献 互助须知 联系我们:info@booksci.cn
Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。
Copyright © 2023 Book学术 All rights reserved.
ghs 京公网安备 11010802042870号 京ICP备2023020795号-1