Wed 20 Jun 2018 11:25 - 11:50 at Grand Ballroom AB - Web Pages Chair(s): Tobias Wrigstad

Despite the presence of garbage collection in managed languages like JavaScript, memory leaks remain a serious problem. In the context of web applications, these leaks are especially pervasive and difficult to debug. Web application memory leaks can take many forms, including failing to dispose of unneeded event listeners, repeatedly injecting iframes and CSS files, and failing to call cleanup routines in third-party libraries. Leaks degrade responsiveness by increasing GC frequency and overhead, and can even lead to browser tab crashes by exhausting available memory. Because previous leak detection approaches designed for conventional C, C++ or Java applications are ineffective in the browser environment, tracking down leaks currently requires intensive manual effort by web developers.

This paper introduces BLeak (Browser Leak debugger), the first system for automatically debugging memory leaks
in web applications. BLeak's algorithms leverage the observation that in modern web applications, users often repeatedly return to the same (approximate) visual state (e.g., the inbox view in Gmail). Sustained growth between round trips is a strong indicator of a memory leak. To use BLeak, a developer writes a short script (17-73 LOC on our benchmarks) to drive a web application in round trips to the same visual state. BLeak then automatically generates a list of leaks found along with their root causes, ranked by return on investment. Guided by BLeak, we identify and fix over 50 memory leaks in popular libraries and apps including Airbnb, AngularJS, Google Analytics, Google Maps SDK, and jQuery. BLeak's median precision is 100%; fixing the leaks it identifies reduces heap growth by an average of 94%, saving from 0.5 MB to 8 MB per round trip. We believe BLeak's approach to be broadly applicable beyond web applications, including to GUI applications on desktop and mobile platforms.

Wed 20 Jun

Displayed time zone: Eastern Time (US & Canada) change

11:00 - 12:15
Web PagesPLDI Research Papers at Grand Ballroom AB
Chair(s): Tobias Wrigstad Uppsala University
11:00
25m
Talk
Verifying That Web Pages Have Accessible Layout
PLDI Research Papers
Pavel Panchekha University of Washington, Adam T. Geller University of Washington, USA, Michael D. Ernst University of Washington, USA, Zachary Tatlock University of Washington, Seattle, Shoaib Kamil Adobe
Media Attached
11:25
25m
Talk
BLeak: Automatically Debugging Memory Leaks in Web Applications
PLDI Research Papers
John Vilk University of Massachusetts, Amherst, Emery D. Berger University of Massachusetts, Amherst
Media Attached
11:50
25m
Talk
Putting in All the Stops: Execution Control for JavaScript
PLDI Research Papers
Samuel Baxter University of Massachusetts at Amherst, USA, Rachit Nigam , Joe Gibbs Politz University of California, San Diego, Shriram Krishnamurthi Brown University, USA, Arjun Guha University of Massachusetts, Amherst
Media Attached