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.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
Similar content being viewed by others
References
Aegis mt, defect detection tool, http://www.digiteklabs.ru/aegis/
Coverity scan: 2011 open source integrity report, http://www.coverity.com/library/pdf/coverity-scan-2011-open-source-integrity-report.pdf
IEEE standard for information technology - portable operating system interface (posix), http://standards.ieee.org/findstds/standard/1003.1-2001-Cor_2-2004.html
Parasoft c++ test, http://www.parasoft.com/jsp/products/cpptest.jsp
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
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
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)
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
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
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
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)
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
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)
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
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
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
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
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
Terauchi, T.: Checking race freedom via linear programming. SIGPLAN Not. 43(6), 1–10 (2008), http://doi.acm.org/10.1145/1379022.1375583
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
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights 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)