Skip to main content

2018 | OriginalPaper | Buchkapitel

Static Detection Method for C/C++ Memory Defects Based on Triad Memory Model

verfasst von : Yuxia Wang, Fusheng Jin, Xiangyu Han, Runan Wang

Erschienen in: Geo-Spatial Knowledge and Intelligence

Verlag: Springer Singapore

Aktivieren Sie unsere intelligente Suche, um passende Fachinhalte oder Patente zu finden.

search-config
loading …

Abstract

The improper use of pointers in C/C++ programming language brings about a lot of memory-related issues. In this paper, causes of four kinds of memory defects are analyzed and summarized. Besides, a novel triad memory model has been proposed. Based on the model and the variable life cycle methodology, an approach for inner-procedure and inter-procedure detection has been presented too. Eventually, the prototype CAnalyzer is implemented on the basis of Clang static analyzer. Experiment results show that CAnalyzer can effectively detect the four types of memory defects.

Sie haben noch keine Lizenz? Dann Informieren Sie sich jetzt über unsere Produkte:

Springer Professional "Wirtschaft+Technik"

Online-Abonnement

Mit Springer Professional "Wirtschaft+Technik" erhalten Sie Zugriff auf:

  • über 102.000 Bücher
  • über 537 Zeitschriften

aus folgenden Fachgebieten:

  • Automobil + Motoren
  • Bauwesen + Immobilien
  • Business IT + Informatik
  • Elektrotechnik + Elektronik
  • Energie + Nachhaltigkeit
  • Finance + Banking
  • Management + Führung
  • Marketing + Vertrieb
  • Maschinenbau + Werkstoffe
  • Versicherung + Risiko

Jetzt Wissensvorsprung sichern!

Springer Professional "Technik"

Online-Abonnement

Mit Springer Professional "Technik" erhalten Sie Zugriff auf:

  • über 67.000 Bücher
  • über 390 Zeitschriften

aus folgenden Fachgebieten:

  • Automobil + Motoren
  • Bauwesen + Immobilien
  • Business IT + Informatik
  • Elektrotechnik + Elektronik
  • Energie + Nachhaltigkeit
  • Maschinenbau + Werkstoffe




 

Jetzt Wissensvorsprung sichern!

Springer Professional "Wirtschaft"

Online-Abonnement

Mit Springer Professional "Wirtschaft" erhalten Sie Zugriff auf:

  • über 67.000 Bücher
  • über 340 Zeitschriften

aus folgenden Fachgebieten:

  • Bauwesen + Immobilien
  • Business IT + Informatik
  • Finance + Banking
  • Management + Führung
  • Marketing + Vertrieb
  • Versicherung + Risiko




Jetzt Wissensvorsprung sichern!

Literatur
Zurück zum Zitat Xu, Z., Zhang, J., Xu, Z.: Melton: a practical and precise memory leak detection tool for C programs. Front. Comput. Sci. 9(1), 34–54 (2015)MathSciNetCrossRef Xu, Z., Zhang, J., Xu, Z.: Melton: a practical and precise memory leak detection tool for C programs. Front. Comput. Sci. 9(1), 34–54 (2015)MathSciNetCrossRef
Zurück zum Zitat Zhang, S., Shang, Z.: Software defect pattern analysis and location based on Cppcheck. Comput. Eng. Appl. 51(3), 69–73 (2015). (in Chinese) Zhang, S., Shang, Z.: Software defect pattern analysis and location based on Cppcheck. Comput. Eng. Appl. 51(3), 69–73 (2015). (in Chinese)
Zurück zum Zitat Jung, Y., Yi, K.: Practical memory leak detector based on parameterized procedural summaries. In: Proceedings of the 7th International Symposium on Memory Management, pp. 131–140. ACM (2008) Jung, Y., Yi, K.: Practical memory leak detector based on parameterized procedural summaries. In: Proceedings of the 7th International Symposium on Memory Management, pp. 131–140. ACM (2008)
Zurück zum Zitat Cherem, S., Princehouse, L., Rugina, R.: Practical memory leak detection using guarded value-flow analysis. In: Proceedings of PLDI, pp. 480–491 (2007)CrossRef Cherem, S., Princehouse, L., Rugina, R.: Practical memory leak detection using guarded value-flow analysis. In: Proceedings of PLDI, pp. 480–491 (2007)CrossRef
Zurück zum Zitat Sui, Y., Ye, D., Xue, J.: Static memory leak detection using full-sparse value-flow analysis. In: Proceedings of International Symposium on Software Testing and Analysis. pp. 254–264 (2012) Sui, Y., Ye, D., Xue, J.: Static memory leak detection using full-sparse value-flow analysis. In: Proceedings of International Symposium on Software Testing and Analysis. pp. 254–264 (2012)
Zurück zum Zitat Li, Q., Pan, M., Li, X.: Memory leak detection tools and evaluation methods. Comput. Sci. Explor. 3(1), 29–35 (2010). (in Chinese) Li, Q., Pan, M., Li, X.: Memory leak detection tools and evaluation methods. Comput. Sci. Explor. 3(1), 29–35 (2010). (in Chinese)
Zurück zum Zitat Wang, S., Quan, Y., Sun, J.: False positive recognition method for hull pointer reference defect based on classification. J. Comput. Appl. 10(2968), 2972–3005 (2017). (in Chinese) Wang, S., Quan, Y., Sun, J.: False positive recognition method for hull pointer reference defect based on classification. J. Comput. Appl. 10(2968), 2972–3005 (2017). (in Chinese)
Zurück zum Zitat Li, X., Zhou, Y., Li, M.C., Chen, Y.J., Xu, G.Q., Wang, L.Z., Li, X.D.: Automatically validating static memory leak warnings for C/C++ programs. Ruan Jian Xue Bao/J. Softw. 28(4), 827–844 (2017). (in Chinese) Li, X., Zhou, Y., Li, M.C., Chen, Y.J., Xu, G.Q., Wang, L.Z., Li, X.D.: Automatically validating static memory leak warnings for C/C++ programs. Ruan Jian Xue Bao/J. Softw. 28(4), 827–844 (2017). (in Chinese)
Zurück zum Zitat Alam, S., Qu, Z., Riley, R., et al.: DroidNative: automating and optimizing detection of android native code malware variants. Comput. Secur. 65, 230–246 (2017)CrossRef Alam, S., Qu, Z., Riley, R., et al.: DroidNative: automating and optimizing detection of android native code malware variants. Comput. Secur. 65, 230–246 (2017)CrossRef
Zurück zum Zitat Xie, Y., Aiken, A.: Context-and path-sensitive memory leak detection. In: ACM SIGSOFT Software Engineering Notes, vol. 30(5), pp. 115–125. ACM (2005) Xie, Y., Aiken, A.: Context-and path-sensitive memory leak detection. In: ACM SIGSOFT Software Engineering Notes, vol. 30(5), pp. 115–125. ACM (2005)
Metadaten
Titel
Static Detection Method for C/C++ Memory Defects Based on Triad Memory Model
verfasst von
Yuxia Wang
Fusheng Jin
Xiangyu Han
Runan Wang
Copyright-Jahr
2018
Verlag
Springer Singapore
DOI
https://doi.org/10.1007/978-981-13-0896-3_7