Font Size: a A A

Research And Implementation Of Runtime Detection Of Memory Errors For C Programs

Posted on:2018-03-27Degree:MasterType:Thesis
Country:ChinaCandidate:J Q YanFull Text:PDF
GTID:2348330536987950Subject:Software engineering
Abstract/Summary:PDF Full Text Request
At present,operating system,enterprise database management system,embedded software are are all written in C/C++ programming language,the reason is that C provides a low-level control of memory layout,proximity to the underlying hardware,requires minimal runtime support.The software written in this language is more efficient and portable.But C language does not detect the boundary of memory,leading to the software may have serious memory errors,such as buffer overflow,dangling pointer,double free,causing the software reliability and safety not be guaranteed.A variety of methods exist to detect memory errors of C programs,but they all suffer from one or more drawbacks including the use of incompatible metadata,the inability to detect all errors,the high overhead and so on.In this paper,an improved pointer-based run-time detection technology is designed.The pointer metadata includes not only the upper and lower bounds but also status of the object pointed,and counting all pointers to the same object.And with the aid of open-source compiler Clang and source code instrumentation technology we complete the prototype tool Movec(Monitoring,verification and control).Comparing with AddressSanitizer,MemorySanitizer,MemCheck and SoftBoundCets in terms of effectiveness,it shows that Movec can detect all known temporal and spatial memory errors.Then we compare Movec with SoftBoundCets in terms of runtime overhead and it shows that Movec is superior to SoftBoundCets with same benchmark.Finally,the instrumentation of ?cos-II source code in Windows platform,it shows that Movec can cross platform.The above experiments show that Movec is a compatible and efficient tool to detect all memory errors of C programs with lower overhead in Linux and Windows platform.
Keywords/Search Tags:memory errors, runtime verification, source code instrumentation, pointer-based, programming language
PDF Full Text Request
Related items