Code Churn Analytics for Selective Sanitizer Instrumentation
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Conventional sanitizer tools impose a high runtime performance penalty due to extensive code instrumentation, and existing solutions to reduce overhead, such as static analysis-based pruning, often require repeated analyses upon slight code changes, hindering widespread adoption.
Innovation Solution
Identify fragile sections of code using code churn data to limit sanitizer instrumentation, flagging nodes in the control flow graph for dynamic analysis, and only instrument susceptible code flows, reducing unnecessary code instrumentation.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If extensive code instrumentation is used to detect all possible errors, then sanitizer effectiveness is improved, but runtime performance penalty increases significantly
Solution Approach 1:
The patent applies local quality by differentiating between fragile and non-fragile code sections. Sanitizer instrumentation is applied selectively only to fragile code sections identified through code churn analysis, rather than uniformly across the entire codebase. This localized approach maintains high detection effectiveness in critical areas while avoiding the performance penalty of instrumenting stable code sections.
Solution Approach 2:
The patent segments the codebase into fragile and non-fragile sections based on code churn metrics. By dividing the code into these distinct segments and applying sanitizer instrumentation only to the fragile segment, the system achieves effective error detection where needed while minimizing overall runtime overhead.
2Productivity
If static analysis-based pruning is used to restrict sanitizer scope, then runtime overhead is reduced, but repeated analyses are required upon code changes
Solution Approach 1:
The patent performs preliminary code churn analysis during the compilation phase to identify fragile code sections before sanitizer instrumentation is applied. This preliminary action creates a stable classification that persists across compilations, avoiding the need for repeated static analysis when minor code changes occur, as the fragile section identification is based on historical churn patterns rather than fresh analysis of each change.
3Reliability
If sanitizer instrumentation is applied to all code, then comprehensive error detection is achieved, but code complexity increases
Solution Approach 1:
The patent reduces code instrumentation complexity by applying instrumentation only to fragile code sections rather than uniformly across all code. This localized approach maintains comprehensive error detection in critical areas while significantly reducing the overall complexity of instrumented code.
Data Source
AI summary
Systems and methods sanitize computer code. In particular, fragile portions of computer code are identified based on instances of bug/defect-related churn data associated with the computer code. A control flow graph representative of the computer code may be generated, the control flow graph including nodes and edges. Nodes whose source location falls within the reported fragile sections are identified, and may be flagged as being susceptible. Thereafter, a sanitizer is run on the flagged nodes.


