Papers
Topics
Authors
Recent
Gemini 2.5 Flash
Gemini 2.5 Flash
125 tokens/sec
GPT-4o
47 tokens/sec
Gemini 2.5 Pro Pro
43 tokens/sec
o3 Pro
4 tokens/sec
GPT-4.1 Pro
47 tokens/sec
DeepSeek R1 via Azure Pro
28 tokens/sec
2000 character limit reached

Static Deadlock Detection for Rust Programs (2401.01114v1)

Published 2 Jan 2024 in cs.PL, cs.CR, and cs.SE

Abstract: Rust relies on its unique ownership mechanism to ensure thread and memory safety. However, numerous potential security vulnerabilities persist in practical applications. New language features in Rust pose new challenges for vulnerability detection. This paper proposes a static deadlock detection method tailored for Rust programs, aiming to identify various deadlock types, including double lock, conflict lock, and deadlock associated with conditional variables. With due consideration for Rust's ownership and lifetimes, we first complete the pointer analysis. Then, based on the obtained points-to information, we analyze dependencies among variables to identify potential deadlocks. We develop a tool and conduct experiments based on the proposed method. The experimental results demonstrate that our method outperforms existing deadlock detection methods in precision.

Definition Search Book Streamline Icon: https://streamlinehq.com
References (34)
  1. Rahul Agarwal and Scott D Stoller. 2006. Run-time detection of potential deadlocks for programs with locks, semaphores, and condition variables. In Proceedings of the 2006 workshop on Parallel and distributed systems: testing and debugging. 51–60.
  2. Lars Ole Andersen. 1994. Program analysis and specialization for the C programming language. (1994).
  3. Rudra: finding memory safety bugs in rust at the ecosystem scale. In Proceedings of the ACM SIGOPS 28th Symposium on Operating Systems Principles. 84–99.
  4. Verifying Rust programs with SMACK. In Automated Technology for Verification and Analysis: 16th International Symposium, ATVA 2018, Los Angeles, CA, USA, October 7-10, 2018, Proceedings 16. Springer, 528–535.
  5. A compositional deadlock detector for Android Java. In 2021 36th IEEE/ACM International Conference on Automated Software Engineering (ASE). IEEE, 955–966.
  6. Flow-insensitive interprocedural alias analysis in the presence of pointers. In Languages and Compilers for Parallel Computing: 7th International Workshop Ithaca, NY, USA, August 8–10, 1994 Proceedings 7. Springer, 234–250.
  7. Peahen: Fast and precise static deadlock detection via context reduction. In Proceedings of the 30th ACM Joint European Software Engineering Conference and Symposium on the Foundations of Software Engineering. 784–796.
  8. Dawson Engler and Ken Ashcraft. 2003. RacerX: Effective, static detection of race conditions and deadlocks. ACM SIGOPS operating systems review 37, 5 (2003), 237–252.
  9. Leveraging compiler intermediate representation for multi-and cross-language verification. In Verification, Model Checking, and Abstract Interpretation: 21st International Conference, VMCAI 2020, New Orleans, LA, USA, January 16–21, 2020, Proceedings 21. Springer, 90–111.
  10. Ben Hardekopf and Calvin Lin. 2011. Flow-sensitive pointer analysis for millions of lines of code. In International Symposium on Code Generation and Optimization (CGO 2011). IEEE, 289–298.
  11. Klaus Havelund. 2000. Using runtime analysis to guide model checking of Java programs. In SPIN Model Checking and Software Verification: 7th International SPIN Workshop, Stanford, CA, USA, August 30-September 1, 2000. Proceedings 7. Springer, 245–264.
  12. David Hovemeyer and William Pugh. 2004. Finding concurrency bugs in java. In Proc. of PODC, Vol. 4.
  13. Comprehensiveness, Automation and Lifecycle: A New Perspective for Rust Security. In 2022 IEEE 22nd International Conference on Software Quality, Reliability and Security (QRS). IEEE, 982–991.
  14. An effective dynamic analysis for detecting generalized deadlocks. In Proceedings of the eighteenth ACM SIGSOFT international symposium on Foundations of software engineering. 327–336.
  15. Steve Klabnik and Carol Nichols. 2023. The Rust Programming Language. https://doc.rust-lang.org/stable/book/
  16. Sound static deadlock analysis for C/Pthreads. In Proceedings of the 31st IEEE/ACM International Conference on Automated Software Engineering. 379–390.
  17. Chris Lattner and Vikram Adve. 2004. LLVM: A compilation framework for lifelong program analysis & transformation. In International symposium on code generation and optimization, 2004. CGO 2004. IEEE, 75–86.
  18. Ondrej Lhoták and Kwok-Chiang Andrew Chung. 2011. Points-to analysis with efficient strong updates. In Proceedings of the 38th annual ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages. 3–16.
  19. MirChecker: detecting bugs in Rust programs via static analysis. In Proceedings of the 2021 ACM SIGSAC Conference on Computer and Communications Security. 2183–2196.
  20. Learning from mistakes: a comprehensive study on real world concurrency bug characteristics. In Proceedings of the 13th international conference on Architectural support for programming languages and operating systems. 329–339.
  21. Effective static deadlock detection. In 2009 IEEE 31st International Conference on Software Engineering. IEEE, 386–396.
  22. Pengxiang Ning and Boqin Qin. 2020. Stuck-me-not: A deadlock detector on blockchain software in Rust. Procedia Computer Science 177 (2020), 599–604.
  23. Stack Overflow. 2020. Stack Overflow Developer Survey. https://insights.stackoverflow.com/survey/2020#most-loved-dreaded-and-wanted
  24. Stack Overflow. 2021. Stack Overflow Developer Survey. https://insights.stackoverflow.com/survey/2021#technology-most-loved-dreaded-and-wanted
  25. Stack Overflow. 2022. Stack Overflow Developer Survey. https://survey.stackoverflow.co/2022#technology-most-loved-dreaded-and-wanted
  26. Boqin Qin. 2020. lockbud. https://github.com/BurtonQin/lockbud
  27. Understanding memory and thread safety practices and issues in real-world Rust programs. In Proceedings of the 41st ACM SIGPLAN Conference on Programming Language Design and Implementation. 763–779.
  28. Yulei Sui and Jingling Xue. 2016. SVF: interprocedural static value-flow analysis in LLVM. In Proceedings of the 25th international conference on compiler construction. 265–266.
  29. Tian Tan and Yue Li. 2022. Tai-e: a static analysis framework for java by harnessing the best designs of classics. arXiv preprint arXiv:2208.00337 (2022).
  30. Soot: A Java bytecode optimization framework. In CASCON First Decade High Impact Papers. 214–224.
  31. Static deadlock detection for Java libraries. In ECOOP 2005-Object-Oriented Programming: 19th European Conference, Glasgow, UK, July 25-29, 2005. Proceedings 19. Springer, 602–629.
  32. Level by level: making flow-and context-sensitive pointer analysis scalable for millions of lines of code. In Proceedings of the 8th annual IEEE/ACM international symposium on Code generation and optimization. 218–229.
  33. Fearless concurrency? understanding concurrent programming safety in real-world rust software. arXiv preprint arXiv:1902.01906 (2019).
  34. Deadlock prediction via generalized dependency. In Proceedings of the 31st ACM SIGSOFT International Symposium on Software Testing and Analysis. 455–466.

Summary

We haven't generated a summary for this paper yet.

HackerNews