Tracing a False Positive in FBInfer’s Purity Analyzer

Cansın Güler

Verified

Project: Technical Analysis of Facebook Infer’s Purity Analyzer

Freelance Technical Writer & Code Analyst | Research-based one-off engagement

About the Project

The client sought a technical deep dive into a false positive bug triggered by Facebook’s static analysis tool, FBInfer —specifically its Purity Analyzer module. The goal was to unpack the behavior behind a misclassification and provide a rigorous write-up that could be used to guide future development or onboarding efforts.
This required understanding and explaining complex interactions between two memory modeling systems used by FBInfer: InferBO and Pulse, across a large, sparsely documented OCaml codebase.

My Role

I was brought on as a solo contributor to analyze the problem from the ground up, trace the underlying logic across multiple components, and synthesize findings into a technical document.
Key responsibilities included:
Investigating the source of the false positive by analyzing logs, memory models, and internal assumptions
Mapping the flow of memory modeling and purity checks across InferBO and Pulse
Identifying and documenting the breaking point where the misclassification occurs
Writing a structured, developer-facing report with annotated findings, error reproduction details, and commentary on model differences
Revising the document based on client feedback to emphasize onboarding and storytelling value
Producing a screencast to walk through the structure and logic for easier comprehension

Working With a Complex, Underdocumented Codebase

FBInfer is a large OCaml-based tool with minimal inline documentation and niche internal terminology. I worked without prior familiarity with OCaml, quickly ramping up to follow data flow across modules and interpret log behavior line-by-line. This required reverse-engineering the system’s intent based solely on output patterns and internal naming conventions.

Deliverables & Impact

The final deliverables included:
A multi-section technical report (Notion + Word)
Inline code references and analysis of key logic
A follow-up screencast video walking through the document and reasoning
A client-tailored rewrite focused on onboarding readability and logical flow
Despite the project’s technical depth and time constraints, I delivered a comprehensive analysis that aligned with the client’s goals. The final materials were recognized for their clarity and depth, and the engagement concluded with positive feedback and further interest in potential collaboration.
Like this project

Posted Apr 23, 2025

Reverse-engineered a misclassification bug in FBInfer's Purity Analyzer and delivered a dev-friendly report across a large OCaml codebase.

Likes

0

Views

2

Timeline

Dec 4, 2024 - Dec 12, 2024

Clients

SafeBook

Founding Engineer  | Fullstack
Founding Engineer | Fullstack
Author @StackAbuse
Author @StackAbuse
Author @LearnDataSci
Author @LearnDataSci