Research on Automated Memory Leak Detection Method Based on Cross-Function Context Tracing

Memory leaks pose a serious threat to the stability of C/C++-based Linux server applications, particularly in long-running systems such as databases and network services. However, accurate detection is challenging due to pointer propagation across functions and threads. Traditional tools like Valgrind and AddressSanitizer often incur high overhead and suffer from false positives in complex multithreaded environments. To address these issues, this paper proposes a hybrid approach that combines static resource propagation graphs with dynamic context-aware tracking. By analyzing resource lifetimes at the LLVM IR level and applying lightweight runtime instrumentation, the method effectively captures cross-function and cross-thread reference relationships. Experiments demonstrate a 98% detection rate, with false positives under 2.5% and average performance overhead below 15%. Compared with existing tools, the proposed solution significantly improves both detection accuracy and runtime efficiency, making it well-suited for memory leak detection in complex real-world applications.

Authors

Institutions

Publication Details

Published
2025-05-09
DOI
https://doi.org/10.1109/aemcse65292.2025.11042800
Primary Topic
Advanced Malware Detection Techniques
Type
article
Field-Weighted Citation Impact
0.00
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

Research on Automated Memory Leak Detection Method Based on Cross-Function Context Tracing

Yan Zhuang, Menglan Li
Advanced Malware Detection Techniques
article

Research on Automated Memory Leak Detection Method Based on Cross-Function Context Tracing

Yan Zhuang, Menglan Li
article en

Abstract

Memory leaks pose a serious threat to the stability of C/C++-based Linux server applications, particularly in long-running systems such as databases and network services. However, accurate detection is challenging due to pointer propagation across functions and threads. Traditional tools like Valgrind and AddressSanitizer often incur high overhead and suffer from false positives in complex multithreaded environments. To address these issues, this paper proposes a hybrid approach that combines static resource propagation graphs with dynamic context-aware tracking. By analyzing resource lifetimes at the LLVM IR level and applying lightweight runtime instrumentation, the method effectively captures cross-function and cross-thread reference relationships. Experiments demonstrate a 98% detection rate, with false positives under 2.5% and average performance overhead below 15%. Compared with existing tools, the proposed solution significantly improves both detection accuracy and runtime efficiency, making it well-suited for memory leak detection in complex real-world applications.

Zhengzhou University (CN)
Openalex Percentile: Top 83%
Advanced Malware Detection Techniques
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.