Microsoft has made another huge step towards open source: Checked C

Source: Internet
Author: User

Microsoft has made another huge step towards open source: Checked C
GuideMicrosoft open-source Checked C, an extension of the C language, can be used to solve a series of security-related risks in the C language. As shown in its name, Checked C adds a check for the C language. This check can help developers check common programming errors, for example, the cache occupies buffer overruns, memory access out of bounds, and incorrect type conversion. These programming errors are often the root cause of many major security vulnerabilities, such as shell-breaking vulnerabilities, Heartbleed vulnerabilities, and Sandworm.

Checked C solves these problems by modifying the control pointer. the pointer is used by programmers to define the memory address operated by their code. When the number of pointers is large, pointer control is often prone to chaos, and the larger the project, the more difficult it is to trace them, similar to Chromium, Firefox, Office, OpenSSL, and other large code libraries, you can see a large number of such problems in their change logs. "Checked C allows programmers to better describe how they want to use pointers and the memory range to which pointers should point," Microsoft said. "This information can be used to add detection in the runtime environment, to detect data access errors, rather than making them happen without notice."

Checked C will also allow developers to detect misuse of functions that they think are available in the C language but are not actually available. In the programming world, this function is called bounds checking. It is used to check whether a variable/pointer is assigned a value within its range, C # And Rust already have such functions, and they are more than that. However, unfortunately, the widely used C and C ++ do not have such a function. Microsoft wants to make the smallest changes to the existing C/C ++ program, using Checked C can improve security, which will attract a large number of developers to start using Checked C.

The Checked C project has been put on GitHub. This is not the first time Microsoft made its own interpretation of the basic programming language. Previously, programmers of the company created a JavaScript superset named TypeScript, which has been widely recognized.

From: https://linux.cn/article-7474-1.html

Address: http://www.linuxprobe.com/microsoft-checkedc-opensource.html


Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.