Static checking method and device for source code pairing
A static inspection and source code technology, applied in the computer field, can solve the problems of concealment and delay, difficulty in program debugging, busy waiting, etc., so as to improve the efficiency of pairing inspection, reduce the workload of programmers, and achieve high pairing inspection. The effect of efficiency
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
Embodiment 1
[0047] Embodiment 1, when unpaired elements to be paired appear in the main function, the pairing is added at the end of the main function.
[0048] Example 1.1 Add pairing at the end of the main function when unpaired memory elements appear in the main function.
[0049]
[0050] As shown in the above example, the pointer "a" of integer type applies for a memory space with a size of 50 words through malloc, and when the operation is completed, free(a) releases the memory space. If one of the operations is missing, it is incorrect. This method can check out the exception and prompt the program developer.
[0051] Example 1.2 When an unpaired lock element appears in the main function, add pairing at the end of the main function.
[0052]
[0053] As shown in the above example, the spin_lock lock test_lock locks the data through splin_lock, and other threads will be busy waiting if they perform the same operation. If one of the operations is missing, it is incorrect. Thi...
Embodiment 2
[0057] In the second embodiment, when unpaired elements to be paired appear in the sub-function, the pairing is added at the end of the sub-function.
[0058] Example 2.1 When an unpaired memory element appears in a sub-function, add a pair at the end of the sub-function.
[0059]
[0060] When an unpaired lock element and entropy element appear in a subfunction, the case of adding a pair at the end of the subfunction is similar to this example.
Embodiment 3
[0061] In the third embodiment, when unpaired elements to be paired appear in the branch structure, a pair is added at the end of each branch of the branch structure.
PUM
Abstract
Description
Claims
Application Information
- R&D Engineer
- R&D Manager
- IP Professional
- Industry Leading Data Capabilities
- Powerful AI technology
- Patent DNA Extraction
Browse by: Latest US Patents, China's latest patents, Technical Efficacy Thesaurus, Application Domain, Technology Topic, Popular Technical Reports.
© 2024 PatSnap. All rights reserved.Legal|Privacy policy|Modern Slavery Act Transparency Statement|Sitemap|About US| Contact US: help@patsnap.com