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

pldi-2018-papers
11:00 - 12:15: PLDI Research Papers - Web Pages at Grand Ballroom AB
Chair(s): Tobias WrigstadUppsala University
pldi-2018-papers11:00 - 11:25
Talk
Pavel PanchekhaUniversity of Washington, Adam T. GellerUniversity of Washington, USA, Michael D. ErnstUniversity of Washington, USA, Zachary TatlockUniversity of Washington, Shoaib KamilAdobe
Media Attached
pldi-2018-papers11:25 - 11:50
Talk
John VilkUniversity of Massachusetts, Amherst, Emery BergerUniversity of Massachusetts, Amherst
Media Attached
pldi-2018-papers11:50 - 12:15
Talk
Samuel BaxterUniversity of Massachusetts at Amherst, USA, Rachit Nigam, Joe Gibbs PolitzUniversity of California, San Diego, Shriram KrishnamurthiBrown University, USA, Arjun GuhaUniversity of Massachusetts, Amherst
Media Attached