首页> 外文期刊>Software >Practical static analysis of context leaks in Android applications
【24h】

Practical static analysis of context leaks in Android applications

机译:对Android应用程序中的上下文泄漏进行实用的静态分析

获取原文
获取原文并翻译 | 示例
           

摘要

Android native applications, written in Java and distributed in APK format, are widely used in mobile devices. Their specific pattern of use lets the operating system control the creation and destruction of resources, such as activities and services (contexts). Programmers are not supposed to interfere with such life cycle events. Otherwise, contexts might be leaked, ie, they will never be deallocated from memory, or be deallocated late, leading to memory exhaustion and frozen applications. In practice, it is easy to write incorrect code, which hinders garbage collection of contexts and leads to context leakages. In this work, we present a novel static analysis method that finds context leaks in Android code. We apply this analysis to APKs translated into Java bytecode. We provide a formal analysis of our algorithms and suggest further research directions for improving precision by combining different approaches. We discuss the results of a large number of experiments with our analysis, which reveal context leaks in many widely used applications from the Android marketplace. This shows the practical usefulness of our technique and its superiority w.r.t. the well-known Lint and Infer static analysis tools. We estimate the amount of memory saved by the collection of the leaks found and explain, experimentally, where programmers often go wrong and limitations of our tool. Such lessons could be used for designing of a sound or more powerful static analysis tool. This work can be considered as a practical application of software analysis techniques to solve practical problems.
机译:用Java编写并以APK格式分发的Android本机应用程序广泛用于移动设备中。它们的特定使用模式使操作系统可以控制资源(例如活动和服务(上下文))的创建和销毁。程序员不应干扰此类生命周期事件。否则,上下文可能会泄漏,即,它们将永远不会从内存中释放,也不会延迟释放,从而导致内存耗尽和应用程序冻结。实际上,编写不正确的代码很容易,这会妨碍上下文的垃圾收集并导致上下文泄漏。在这项工作中,我们提出了一种新颖的静态分析方法,该方法可以发现Android代码中的上下文泄漏。我们将此分析应用于翻译成Java字节码的APK。我们对算法进行了形式化分析,并提出了进一步的研究方向,以结合不同的方法来提高精度。我们通过分析来讨论大量实验的结果,这些结果揭示了Android市场上许多广泛使用的应用程序中的上下文泄漏。这表明了我们技术的实际实用性及其优越性。著名的Lint和Infer静态分析工具。我们通过收集发现的泄漏来估计所节省的内存量,并通过实验说明程序员经常出错的地方以及我们工具的局限性。这些课程可用于设计声音或更强大的静态分析工具。这项工作可视为解决实际问题的软件分析技术的实际应用。

著录项

  • 来源
    《Software》 |2019年第2期|233-251|共19页
  • 作者单位

    Univ Rosario, Dept Appl Math & Comp Sci, Bogota, Colombia;

    Singapore Univ Technol & Design, Singapore 487372, Singapore;

  • 收录信息 美国《科学引文索引》(SCI);美国《工程索引》(EI);
  • 原文格式 PDF
  • 正文语种 eng
  • 中图分类
  • 关键词

    Android; memory leak; static analysis;

    机译:Android;内存泄漏;静态分析;

相似文献

  • 外文文献
  • 中文文献
  • 专利
获取原文

客服邮箱:kefu@zhangqiaokeyan.com

京公网安备:11010802029741号 ICP备案号:京ICP备15016152号-6 六维联合信息科技 (北京) 有限公司©版权所有
  • 客服微信

  • 服务号