https://github.com/microsoft/checkedc Skip to content Toggle navigation Sign up * Product + Actions Automate any workflow + Packages Host and manage packages + Security Find and fix vulnerabilities + Codespaces Instant dev environments + Copilot Write better code with AI + Code review Manage code changes + Issues Plan and track work + Discussions Collaborate outside of code + Explore + All features + Documentation + GitHub Skills + Blog * Solutions + For + Enterprise + Teams + Startups + Education + By Solution + CI/CD & Automation + DevOps + DevSecOps + Case Studies + Customer Stories + Resources * Open Source + GitHub Sponsors Fund open source developers + The ReadME Project GitHub community articles + Repositories + Topics + Trending + Collections * Pricing [ ] * # In this repository All GitHub | Jump to | * No suggested jump to results * # In this repository All GitHub | Jump to | * # In this organization All GitHub | Jump to | * # In this repository All GitHub | Jump to | Sign in Sign up {{ message }} microsoft / checkedc Public * Notifications * Fork 191 * Star 2.9k Checked C is an extension to C that lets programmers write C code that is guaranteed by the compiler to be type-safe. The goal is to let people easily make their existing C code type-safe and eliminate entire classes of errors. Checked C does not address use-after-free errors. This repo has a wiki for Checked C, sample code, the specification, a... www.microsoft.com/en-us/research/project/checked-c/ License View license 2.9k stars 191 forks Star Notifications * Code * Issues 59 * Pull requests 3 * Discussions * Actions * Projects 0 * Wiki * Security * Insights More * Code * Issues * Pull requests * Discussions * Actions * Projects * Wiki * Security * Insights microsoft/checkedc This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository. master Switch branches/tags [ ] Branches Tags Could not load branches Nothing to show {{ refName }} default View all branches Could not load tags Nothing to show {{ refName }} default View all tags Name already in use A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch? Cancel Create 20 branches 7 tags Code * Local * Codespaces * Clone HTTPS GitHub CLI [https://github.com/m] Use Git or checkout with SVN using the web URL. [gh repo clone micros] Work fast with our official CLI. Learn more. * Open with GitHub Desktop * Download ZIP Sign In Required Please sign in to use Codespaces. Launching GitHub Desktop If nothing happens, download GitHub Desktop and try again. Launching GitHub Desktop If nothing happens, download GitHub Desktop and try again. Launching Xcode If nothing happens, download Xcode and try again. Launching Visual Studio Code Your codespace will open once ready. There was a problem preparing your codespace, please try again. Latest commit @microsoft-github-policy-service microsoft-github-policy-service[bot] Microsoft mandatory file (#481) ... a0461e8 Sep 1, 2022 Microsoft mandatory file (#481) Co-authored-by: microsoft-github-policy-service[bot] <77245923+microsoft-github-policy-service[bot]@users.noreply.github.com> a0461e8 Git stats * 431 commits Files Permalink Failed to load latest commit information. Type Name Latest commit message Commit time include Fixes for errors in the "array_ptr" interfaces to some libc functions... Jun 11, 2021 papers A 45-minute presentation on Checked C. (#476) Sep 29, 2021 samples Fix typos and spacing in spec and samples. (#406) Jun 30, 2020 spec Clarification updates to the Checked C specification. (#469) Sep 7, 2021 tests Get lvalue observed bounds: update test (#474) Sep 10, 2021 .gitignore Add a .gitignore file for executables (#293) Jul 26, 2018 CONTRIBUTING.md Documentation fixes for checkedc issues #451 and #437. (#468) Aug 31, 2021 LICENSE.TXT Update copyright notice. Jun 13, 2016 README.md Documentation fixes for checkedc issues #451 and #437. (#468) Aug 31, 2021 SECURITY.md Microsoft mandatory file (#481) Sep 1, 2022 WishList.md Add a wish list of projects. (#27) Jun 15, 2016 View code Checked C Publications and Presentations Build Status Participating Licensing Code of conduct README.md Checked C Checked C adds static and dynamic checking to C to detect or prevent common programming errors such as buffer overruns and out-of-bounds memory accesses. The goal of the project is to improve systems programming by making fundamental improvements to C. This repo contains sample code, the extension specification, and test code. * For a quick overview of Checked C, more information, and pointers to example code, see our Wiki. * The PDF of the specification is available here. * Compilers are available here. * The Checked C clang repo is here. * The instructions to build and test the Checked C compiler are documented on the Checked C clang wiki. Publications and Presentations * We presented a research paper on Checked C at the IEEE 2018 Cybersecurity Development Conference: "Checked C: Making C Safe by Extension". The paper describes the key ideas of Checked C in 8 pages. Note that we have added features to Checked C for improving type safety (and reducing type confusion) since writing the paper. The Wiki and specification provide up-to-date descriptions of Checked C. * We presented another paper on Checked C at the 2019 Principles of Security and Trust Conference: "Achieving Safety Incrementally With Checked C". This paper describes a tool for converting existing C code to use Ptr types. It also proves a blame property about checked regions that shows that checked regions are blameless for any memory corruption. This proof is formalized for a core subset of the language extension. * We presented a poster at the LLVM Dev Meeting 2019: "Overflows Be Gone: Checked C for Memory Safety". The poster provides an introduction to Checked C, outlines the compiler implementation and presents an experimental evaluation of Checked C. * We presented a talk (slides) at the 2020 LLVM Virtual Dev Meeting : "Checked C: Adding memory safety support to LLVM". The talk describes the design of bounds annotations for checked pointers and array pointers as well as the framework for the static checking of the soundness of bounds. We also briefly describe novel algorithms to automatically widen bounds for null-terminated arrays and for comparison of expressions for equivalence. Build Status Configuration Testing Status Debug X86 Checked C and clang regression Debug X86 Windows Windows tests status Debug X64 Checked C and clang regression Debug X64 Windows Windows tests status Debug X64 Checked C and clang regression Debug X64 Linux Linux tests status Release X64 Checked C, clang, and LLVM Release X64 Linux Linux nightly tests status Participating We're happy to have the help! You can contribute by trying out Checked C, reporting bugs, and giving us feedback. There are other ways to contribute too. You can watch the announcement page for announcements about the project. Licensing The software in this repository is covered by the MIT license. See the file LICENSE.TXT for the license. The Checked C specification is made available by Microsoft under the OpenWeb Foundation Final Specification Agreement, version 1.0. Contributions of code to the Checked LLVM/clang repos are subject to the CLANG/LLVM licensing terms. Code of conduct This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments. About Checked C is an extension to C that lets programmers write C code that is guaranteed by the compiler to be type-safe. The goal is to let people easily make their existing C code type-safe and eliminate entire classes of errors. Checked C does not address use-after-free errors. This repo has a wiki for Checked C, sample code, the specification, a... www.microsoft.com/en-us/research/project/checked-c/ Topics microsoft c programming-language llvm clang system-programming Resources Readme License View license Code of conduct Code of conduct Security policy Security policy Stars 2.9k stars Watchers 107 watching Forks 191 forks Releases 6 Version 0.9 of the Checked C specification Latest Sep 15, 2021 + 5 releases Packages 0 No packages published Contributors 32 * @dtarditi * @lenary * @kkjeer * @AnnaKornfeldSimpson * @mgrang * @wonsubkim * @sulekhark * @jijoongmoon * @jp1729 * @Prabhuk * @ppashakhanloo + 21 contributors Languages * C 60.2% * TeX 39.2% * Other 0.6% Footer (c) 2022 GitHub, Inc. Footer navigation * Terms * Privacy * Security * Status * Docs * Contact GitHub * Pricing * API * Training * Blog * About You can't perform that action at this time. You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.