CCured

Author:

Necula George C.1,McPeak Scott1,Weimer Westley1

Affiliation:

1. University of California, Berkeley

Abstract

In this paper we propose a scheme that combines type inference and run-time checking to make existing C programs type safe. We describe the CCured type system, which extends that of C by separating pointer types according to their usage. This type system allows both pointers whose usage can be verified statically to be type safe, and pointers whose safety must be checked at run time. We prove a type soundness result and then we present a surprisingly simple type inference algorithm that is able to infer the appropriate pointer kinds for existing C programs.Our experience with the CCured system shows that the inference is very effective for many C programs, as it is able to infer that most or all of the pointers are statically verifiable to be type safe. The remaining pointers are instrumented with efficient run-time checks to ensure that they are used safely. The resulting performance loss due to run-time checks is 0-150%, which is several times better than comparable approaches that use only dynamic checking. Using CCured we have discovered programming bugs in established C programs such as several SPECINT95 benchmarks.

Publisher

Association for Computing Machinery (ACM)

Subject

Computer Graphics and Computer-Aided Design,Software

Reference29 articles.

1. Dynamic typing in a statically typed language

2. Efficient detection of all pointer and array access errors

3. Garbage collection in an uncooperative environment

4. Computing with coercions

5. L. Cardelli J. Donahue L. Glassman M. Jordan B. Kalsow and G. Nelson. Modula3 report 1989. L. Cardelli J. Donahue L. Glassman M. Jordan B. Kalsow and G. Nelson. Modula3 report 1989.

Cited by 148 articles. 订阅此论文施引文献 订阅此论文施引文献,注册后可以免费订阅5篇论文的施引文献,订阅后可以查看论文全部施引文献

1. Memory Tagging using Cryptographic Integrity on Commodity x86 CPUs;2024 IEEE 9th European Symposium on Security and Privacy (EuroS&P);2024-07-08

2. Foundations for a Rust-Like Borrow Checker for C;Proceedings of the 25th ACM SIGPLAN/SIGBED International Conference on Languages, Compilers, and Tools for Embedded Systems;2024-06-20

3. Formal Mechanised Semantics of CHERI C: Capabilities, Undefined Behaviour, and Provenance;Proceedings of the 29th ACM International Conference on Architectural Support for Programming Languages and Operating Systems, Volume 1;2024-04-17

4. GWP-ASan: Sampling-Based Detection of Memory-Safety Bugs in Production;Proceedings of the 46th International Conference on Software Engineering: Software Engineering in Practice;2024-04-14

5. A Smart Status Based Monitoring Algorithm for the Dynamic Analysis of Memory Safety;ACM Transactions on Software Engineering and Methodology;2023-12-11

同舟云学术

1.学者识别学者识别

2.学术分析学术分析

3.人才评估人才评估

"同舟云学术"是以全球学者为主线,采集、加工和组织学术论文而形成的新型学术文献查询和分析系统,可以对全球学者进行文献检索和人才价值评估。用户可以通过关注某些学科领域的顶尖人物而持续追踪该领域的学科进展和研究前沿。经过近期的数据扩容,当前同舟云学术共收录了国内外主流学术期刊6万余种,收集的期刊论文及会议论文总量共计约1.5亿篇,并以每天添加12000余篇中外论文的速度递增。我们也可以为用户提供个性化、定制化的学者数据。欢迎来电咨询!咨询电话:010-8811{复制后删除}0370

www.globalauthorid.com

TOP

Copyright © 2019-2024 北京同舟云网络信息技术有限公司
京公网安备11010802033243号  京ICP备18003416号-3