Safe Secure Compiler Eliminating Undefined Behavior in C and C++

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

The C and C++ programming languages exhibit undefined behaviors that lead to programming errors, security vulnerabilities, and significant economic losses due to issues like buffer overflows and null pointer indirection, which existing technologies struggle to fully address.

Innovation Solution

The development of a Safe Secure Compiler (SSC) system that employs control flow analysis, data flow analysis, and pointer management techniques to eliminate undefined behaviors by generating fatal diagnostic messages and ensuring safe secure object files, executable programs, and linker diagnostics.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Adaptability or versatility

If C and C++ languages are used for software development, then programming flexibility and performance are improved, but undefined behaviors such as buffer overflows and null pointer indirection occur causing security vulnerabilities and programming errors

Engineering Contradiction:
Improveprogramming flexibilityVSAvoidsoftware reliability
Core Design Contradiction:
Adaptability or versatilityVSReliability

Solution Approach 1:

The patent introduces an intermediary verification system between the programmer and the compiled code. This system includes automated analysis tools that examine control flow, data flow, and pointer operations to detect undefined behaviors before execution. The intermediary layer validates pointer arithmetic, checks buffer boundaries, and verifies null pointer conditions without restricting the underlying C/C++ language capabilities, thus maintaining programming flexibility while eliminating reliability issues

Inventive Principle:
Principle #24Intermediary (Mediator)

Solution Approach 2:

The patent applies preliminary verification actions during compilation and before program execution. Static analysis tools examine source code for potential undefined behaviors including buffer overflow conditions, null pointer dereferences, and invalid memory accesses. The system performs definite-assignment analysis and control flow verification in advance, identifying and correcting reliability issues before the software is deployed, thereby preventing security vulnerabilities while preserving language versatility

Inventive Principle:
Principle #10Preliminary action

2Reliability

If automated verification techniques are applied to eliminate undefined behaviors, then software safety and security are improved, but compilation complexity and processing time increase

Engineering Contradiction:
Improvesoftware safetyVSAvoidcompilation complexity
Core Design Contradiction:
ReliabilityVSDevice complexity

Solution Approach 1:

The patent segments the verification process into distinct modular analysis passes, each handling specific aspects of undefined behavior detection. The system divides verification into control flow analysis, data flow analysis, pointer analysis, and definite-assignment analysis as separate but coordinated components. Each module focuses on a specific aspect of safety verification, making the overall complex task manageable and allowing selective application of different verification techniques based on program characteristics

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent employs parameter changes in the form of compiler flags and analysis depth controls that allow users to adjust verification intensity. The system can operate in different modes ranging from basic safety checks to comprehensive undefined behavior elimination, enabling practitioners to balance safety requirements against compilation time and resource constraints. This parameter-based control allows the same verification infrastructure to serve both safety-critical and performance-sensitive applications

Inventive Principle:
Principle #35Parameter changes

Data Source

PatentUS7584461B2Automated safe secure techniques for eliminating undefined behavior in computer software
Publication Date: 2009.09.01 T & L PLUM LLC
  • US7584461B2 patent drawing
  • US7584461B2 patent drawing
  • US7584461B2 patent drawing

AI summary

Automated (e.g., compiler implemented) techniques provide safe secure software development. One exemplary illustrative implementation addresses undefined behavior in the C and C++ programming languages.