Closed Bug 1107193 Opened 8 years ago Closed 8 years ago

Make it easier to run the static rooting analysis


(Core :: JavaScript Engine, defect)

Not set





(Reporter: jorendorff, Assigned: jorendorff)



(1 file, 2 obsolete files)

(resisting the temptation to file this under "Core :: Spelling checker")

I'm writing a script that downloads sixgill and gcc from people.m.o, unzips them in a directory, builds SpiderMonkey with the custom gcc, and finally runs the analysis. I don't know if it's the right thing to have this in-tree, but since I'm doing it...
Attachment #8531936 - Attachment is obsolete: true
Attachment #8531936 - Flags: review?(josfinkenstein)
Assignee: nobody → jorendorff
Attachment #8531937 - Attachment is obsolete: true
Attachment #8531937 - Flags: review?(sphink)
Comment on attachment 8531941 [details] [diff] [review]
Add a script that makes it easy to run the static rooting analysis

Review of attachment 8531941 [details] [diff] [review]:

Sure, why not?

::: js/src/devtools/rootAnalysis/README.txt
@@ +7,2 @@
> +1.  Be on Linux x86_64.

You may want to warn that you will need to be on Fedora/CentOS/RedHat, or another distro that installs libstdc++ in the same place that they do. (Specifically, the prebuilt GCC won't work on Ubuntu without the CFLAGS and CXXFLAGS settings from and Ubuntu is pretty common.)

@@ +17,2 @@
> +`` is kind of like `configure` and `make` combined:

That seems like an odd name. It's not just setting stuff up, it's running the whole dang thing.

::: js/src/devtools/rootAnalysis/
@@ +6,5 @@
> +set -eu
> +
> +ANALYSIS_SCRIPTDIR="$(dirname $0)"
> +MOZILLA_SRCDIR="$(cd $ANALYSIS_SCRIPTDIR && (hg root || git rev-parse --show-toplevel))"

Uh, what the heck is that git thing doing in there? Seems redundant, and on my system it spews

fatal: Not a git repository (or any parent up to mount point /home)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).

@@ +35,5 @@
> +# ==============================
> +#
> +# The first step is to generate the .xdb files that contain the information
> +# needed by the analysis. This is done by compiling SpiderMonkey with the
> +# sixgill plugin enabled. The plugin creates .xdb files which the analysis

grammar nazi says s/which/that/.

@@ +81,5 @@
> +echo "js = '${JS}'" >>
> +echo "analysis_scriptdir = '${ANALYSIS_SCRIPTDIR}'" >>
> +
> +# Run the script that runs the scripts that do the analysis.
> +python2.7 "${MOZILLA_SRCDIR}/js/src/devtools/rootAnalysis/" -j 8 callgraph

I worry slightly that python2.7 might make this a little more distro-sensitive, because I thought some used python27 instead, but meh.
Attachment #8531941 - Flags: review?(sphink) → review+
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla38
You need to log in before you can comment on or make changes to this bug.