Tool Guide for Linux testing software (1)

Source: Internet
Author: User

A list of some errors that Lint can check: Possible null pointers, this pointer is used after memory is released, assignment order problems, spelling errors, and so on. Generally, a C/C ++ compiler assumes that the program is correct, while Lint is the opposite. Therefore, it is better than the general check executed by the compiler. Lint can run through multiple files to perform error checking and code analysis. This is something the compiler cannot do. Popular Lint programs include: PC-lint is a commercial program provided by Gimpel Software that supports C/C ++; Splint (the original LCLint) it is a GNU Free Lint program, but only supports C and does not support C ++.

When running Lint, just like a normal compiler, you just need to add the makefile directly. You can control and calibrate the Lint output by configuring options and code annotations. For example, here is a function that returns a NULL pointer. Splint can be identified through the following comments/* @ null:
 

 
 
  1. /* @ Null @ */void * test (void)
  2. {
  3. // A function that returns NULL!
  4. Return NULL;
  5. }

This has two purposes: to prevent Splint from alerting the function that returns the Null pointer for this function; To ensure that Splint checks that the return pointer of this function is valid in any code that calls this function.

3) Flawfinder

Flawfinder is a security audit tool for c and c ++ programs written in Python to check potential security risks. It searches for the source code of the file to obtain potential security vulnerabilities. It supports detecting databases and generating reports in HTML format.


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.