2017 · 39 citations · 30 references
ComputingComputer SystemsFault ToleranceFault-tolerant SystemsSystems ProgrammingError HandlingError PreventionError RecoveryEvent-driven ArchitectureRace Condition VulnerabilitiesSoftware Fault ToleranceAutomated Program RepairCode InstrumentationError-prone RepairEvent HandlingEvent SchedulingEvent-driven SchedulingJavascript Event Handling
Modern web applications are written in an event-driven style, in which event handlers execute asynchronously in response to user or system events. The nondeterminism arising from this programming style can lead to pernicious errors. Recent work focuses on detecting event races and classifying them as harmful or harmless. However, since modifying the source code to prevent harmful races can be a difficult and error-prone task, it may be preferable to steer away from the bad executions. In this paper, we present a technique for automated repair of event race errors in JavaScript web applications. Our approach relies on an event controller that restricts event handler scheduling in the browser according to a specified repair policy, by intercepting and carefully postponing or discarding selected events. We have implemented the technique in a tool called EventRaceCommander, which relies entirely on source code instrumentation, and evaluated it by repairing more than 100 event race errors that occur in the web applications from the largest 20 of the Fortune 500 companies. Our results show that application-independent repair policies usually suffice to repair event race errors without excessive negative impact on performance or user experience, though application-specific repair policies that target specific event races are sometimes desirable.
30
Zuoning Yin, Ding Yuan, Yuanyuan Zhou et al. · 2011 · 249 citations
Automated atomicity-violation fixing
Guoliang Jin, Linhai Song, Wei Zhang et al. · 2011 · 142 citations
Effective race detection for event-driven programs
Veselin Raychev, Martin Vechev, Manu Sridharan · 2013 · 127 citations
Automated concurrency-bug fixing
Guoliang Jin, Wei Zhang, Dongdong Deng et al. · 2012 · 122 citations
Race detection for Android applications
Pallavi Maiya, Aditya Kanade, Rupak Majumdar · 2014 · 115 citations