Automating Scope-Based Resource Cleanup with Coccinelle
summary
Automates conversion of lock/unlock pairs into scope-based cleanup using Coccinelle SmPL, replacing explicit unlocks with scope guard or guard where safe, driven by static analysis and a configurable makefile for ~50 lock kinds. Script lives on GitHub, runs semantic patches, and validates by compiling transformed code; it skips patterns with nested re-locks, breaks, gotos, or unknown calls to avoid unsafe moves of unlocks. Many additional opportunities remain and manual review of diffs is required.
AI-written summary · about
related talks
01h 02mProgram Manipulation of C Code
30mFast, Lean, Precise, Controlled: Compliance Automation With OSCAL in Our Open-S...
35mOSCAR - Automate software analysis, compliance and security
01h 08m“Declarative Control Flow"
20mAutomatic and Incremental Repair for Speculative Information Leaks
24mLicense compliance with AI assisted coding
33mORT Automate compliance using Open Source & InnerSource
08mAutomated Checks Before Publishing Open Source, a Few Years La...
