Last Comment Bug 831409 - Statically find rooting hazards and unnecessary roots
: Statically find rooting hazards and unnecessary roots
Product: Core
Classification: Components
Component: JavaScript Engine (show other bugs)
: Other Branch
: All All
-- normal with 1 vote (vote)
: mozilla29
Assigned To: general
: Jason Orendorff [:jorendorff]
: 658676 (view as bug list)
Depends on: 829243 831822 831961 833396 895647 895654
Blocks: 834909
  Show dependency treegraph
Reported: 2013-01-16 11:16 PST by Brian Hackett (:bhackett)
Modified: 2013-12-12 12:25 PST (History)
10 users (show)
See Also:
Crash Signature:
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Description User image Brian Hackett (:bhackett) 2013-01-16 11:16:28 PST
With an analysis to find the set of functions which can GC (bug 829243), it is not too hard to automatically find unrooted GC thing pointers or Values which are held live across a call which can GC, or to find rooted things which are not held live across such a call (and for which the root adds unnecessary overhead).

I wrote some more scripts to find variables fitting either of these categories, building on top of bug 829243 and also stored at  A list of all the reports is at:

This currently reports 851 rooting hazards in the shell (though 107 are in jsxml.cpp and can be ignored), and 171 unnecessary roots.  These reports are still preliminary and will have a fair number of false positives, will be working to improve this.  For usability the number of false positives needs to be zero.
Comment 1 User image Brian Hackett (:bhackett) 2013-01-17 10:01:05 PST
*** Bug 658676 has been marked as a duplicate of this bug. ***
Comment 2 User image Terrence Cole [:terrence] 2013-12-12 10:06:20 PST

Note You need to log in before you can comment on or make changes to this bug.