Skip to main content

Static Analysis Approach for Defect Detection in Multithreaded C/C++ Programs

  • Conference paper
Software Engineering for Resilient Systems (SERENE 2013)

Part of the book series: Lecture Notes in Computer Science ((LNPSE,volume 8166))

Included in the following conference series:

Abstract

Automatic defect detection in multithreaded programs with pointers and recursion is a real challenge. In this paper we present a static analysis approach targeted to detection of wide range of defect types in multithreaded programs, including some types of synchronization errors. This approach is based on well-known algorithms for interval and points-to analysis, which are extended with the developed algorithms for analysis of parallel execution. We show efficiency of our approach by evaluating it on a set of artificial and real-world multithreaded C/C++ programs based on Pthreads.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 39.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 49.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. Aegis mt, defect detection tool, http://www.digiteklabs.ru/aegis/

  2. Coverity scan: 2011 open source integrity report, http://www.coverity.com/library/pdf/coverity-scan-2011-open-source-integrity-report.pdf

  3. IEEE standard for information technology - portable operating system interface (posix), http://standards.ieee.org/findstds/standard/1003.1-2001-Cor_2-2004.html

  4. Parasoft c++ test, http://www.parasoft.com/jsp/products/cpptest.jsp

  5. Bouajjani, A., Esparza, J., Touili, T.: A generic approach to the static analysis of concurrent programs with procedures. SIGPLAN Not. 38(1), 62–73 (2003), http://doi.acm.org/10.1145/640128.604137

    Article  Google Scholar 

  6. Chugh, R., Voung, J.W., Jhala, R., Lerner, S.: Dataflow analysis for concurrent programs using datarace detection. In: Gupta, R., Amarasinghe, S.P. (eds.) PLDI, pp. 316–326. ACM (2008), http://dblp.uni-trier.de/db/conf/pldi/pldi2008.html#ChughVJL08

  7. Cytron, R., Ferrante, J., Rosen, B.K., Wegman, M.N., Zadeck, F.K.: Efficiently computing static single assignment form and the control dependence graph. ACM Transaction on Programming Languages and Systems 13, 451–490 (1991)

    Article  Google Scholar 

  8. Emmi, M., Qadeer, S., Rakamaric, Z.: Delay-bounded scheduling. In: Ball, T., Sagiv, M. (eds.) POPL, pp. 411–422. ACM (2011), http://dblp.uni-trier.de/db/conf/popl/popl2011.html#EmmiQR11

  9. Engler, D., Ashcraft, K.: Racerx: effective, static detection of race conditions and deadlocks. SIGOPS Oper. Syst. Rev. 37(5), 237–252 (2003), http://doi.acm.org/10.1145/1165389.945468

    Article  Google Scholar 

  10. Gotsman, A., Berdine, J., Cook, B., Sagiv, M.: Thread-modular shape analysis. SIGPLAN Not. 42(6), 266–277 (2007), http://doi.acm.org/10.1145/1273442.1250765

    Article  Google Scholar 

  11. Kahlon, V., Sankaranarayanan, S., Gupta, A.: Semantic reduction of thread interleavings in concurrent programs. In: Kowalewski, S., Philippou, A. (eds.) TACAS 2009. LNCS, vol. 5505, pp. 124–138. Springer, Heidelberg (2009)

    Chapter  Google Scholar 

  12. Kahlon, V., Sinha, N., Kruus, E., Zhang, Y.: Static data race detection for concurrent programs with asynchronous calls. In: van Vliet, H., Issarny, V. (eds.) ESEC/SIGSOFT FSE, pp. 13–22. ACM (2009), http://dblp.uni-trier.de/db/conf/sigsoft/fse2009.html#KahlonSKZ09

  13. Lahiri, S.K., Qadeer, S., Rakamarić, Z.: Static and precise detection of concurrency errors in systems code using SMT solvers. In: Bouajjani, A., Maler, O. (eds.) CAV 2009. LNCS, vol. 5643, pp. 509–524. Springer, Heidelberg (2009)

    Chapter  Google Scholar 

  14. Lal, A., Reps, T.W.: Reducing concurrent analysis under a context bound to sequential analysis. Formal Methods in System Design 35(1), 73–97 (2009), http://dblp.uni-trier.de/db/journals/fmsd/fmsd35.html#LalR09

    Article  MATH  Google Scholar 

  15. Naik, M., Park, C.S., Sen, K., Gay, D.: Effective static deadlock detection. In: ICSE, pp. 386–396. IEEE (2009), http://dblp.uni-trier.de/db/conf/icse/icse2009.html#NaikPSG09

  16. Pratikakis, P., Foster, J.S., Hicks, M.: Locksmith: Practical static race detection for c. ACM Trans. Program. Lang. Syst. 33(1), 3:1–3:55 (2011), http://doi.acm.org/10.1145/1889997.1890000

    Google Scholar 

  17. Qadeer, S., Wu, D.: Kiss: keep it simple and sequential. In: Pugh, W., Chambers, C. (eds.) PLDI, pp. 14–24. ACM (2004), http://dblp.uni-trier.de/db/conf/pldi/pldi2004.html#QadeerW04

  18. Srinivasan, H., Hook, J., Wolfe, M.: Static single assignment for explicitly parallel programs. In: Proceedings of the 20th ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, POPL 1993, pp. 260–272. ACM, New York (1993), http://doi.acm.org/10.1145/158511.158644

    Chapter  Google Scholar 

  19. Terauchi, T.: Checking race freedom via linear programming. SIGPLAN Not. 43(6), 1–10 (2008), http://doi.acm.org/10.1145/1379022.1375583

    Article  Google Scholar 

  20. La Torre, S., Madhusudan, P., Parlato, G.: Reducing context-bounded concurrent reachability to sequential reachability. In: Bouajjani, A., Maler, O. (eds.) CAV 2009. LNCS, vol. 5643, pp. 477–492. Springer, Heidelberg (2009), http://dblp.uni-trier.de/db/conf/cav/cav2009.html#TorreMP09

    Chapter  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2013 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Moiseev, M. (2013). Static Analysis Approach for Defect Detection in Multithreaded C/C++ Programs. In: Gorbenko, A., Romanovsky, A., Kharchenko, V. (eds) Software Engineering for Resilient Systems. SERENE 2013. Lecture Notes in Computer Science, vol 8166. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-40894-6_14

Download citation

  • DOI: https://doi.org/10.1007/978-3-642-40894-6_14

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-642-40893-9

  • Online ISBN: 978-3-642-40894-6

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics