Font Size: a A A

Concurrency Error Detection For Android Application Based On Constraint Solving

Posted on:2021-01-03Degree:MasterType:Thesis
Country:ChinaCandidate:X L YuFull Text:PDF
GTID:2518306557487384Subject:Computer technology
Abstract/Summary:PDF Full Text Request
The support of multithreaded programming and asynchronous event processing makes the execution behavior of Android applications uncertain.If two unsynchronized events can access a shared memory unit concurrently and at least one of the events is a write access,data race will occur.Data race is a common concurrency defect that can cause serious consequences such as abnormal running of Android applications,crashes,and invalid update of data.Existing Android application data race detection technologies generally use dynamic or static detection methods,which have the problems of high static detection false positive rate,low dynamic detection code coverage,and high false negative rate.In order to improve the ability of Android application data race,this thesis proposes a method of Android application data race detection based on constraint solving.The method first uses static analysis technology to obtain shared variable access information,conflict event peer information,and generates all potential data races;then uses dynamic search technology to generate the GUI test model of the application to be tested,and uses symbol execution technology to generate the symbol summary of the application to be tested Information,for potential data race events,based on the GUI model and symbol summary information,generate candidate event sequences that can cover the corresponding potential data race codes;finally,run each candidate event sequence dynamically,collect the execution trace of each event sequence,and use constraint-based solution predictive analysis technology performs constrained solution to event pairs that may cause data race in the execution trace,and transforms the problem of concurrent error detection into a constrained solution problem.This method collects and executes multiple candidate event sequences through static and dynamic analysis to overcome the defects of low code coverage in dynamic detection methods,while maintaining the advantages of low false positive rate and high efficiency of predictive analysis technology.On the basis of the above work,this thesis designs and implements the Android application concurrent error detection tool ADR based on constraint solving,and compares it with the dynamic data race detection tool Event Racer and the static data race detection tool n Adroid.The experimental results show that ADR can effectively detect data race in Android applications,reaching a good compromise between detection effect and efficiency.Compared with Event Racer,ADR improves code coverage by generating multiple event sequences and can detect more data race.Compared with n Adroid,ADR improves detection accuracy and efficiency,and detection time is reduced by about 67%.
Keywords/Search Tags:data race, constraint solving, predictive analysis, Android application
PDF Full Text Request
Related items