gecko-dev/tools/profiler
Jim Chen 0574002b30 Bug 1260208 - part 0 - correctly compare EHTable when sorting; r=froydnj
operator< for EHTable compares the LHS start PC with the RHS *end* PC.
Because the ranges are non-overlapping, this works fine for two distinct
EHTables. However, the comparison doesn't work if LHS and RHS refer to
the same EHTable; in that case operator< returns true, even though it
should return false because the two operands are identical.

The operator is used to sort a std::vector using std::sort [1].  I think
the libc++ std::sort implementation has a quirk where, if the comparison
function has the above bug, sort will sometimes get confused, and start
sorting "values" outside of the memory range that it's given.  This
results in memory corruption and subsequent unpredictable behavior.

The fix is simply to compare only the start PCs in EHTable, so that
std::sort can work on it correctly.

[1] http://mxr.mozilla.org/mozilla-central/source/tools/profiler/core/EHABIStackWalk.cpp?rev=86730d0a8209#485
2016-05-03 09:13:49 -04:00
..
core Bug 1260208 - part 0 - correctly compare EHTable when sorting; r=froydnj 2016-05-03 09:13:49 -04:00
gecko Bug 1265927: Move nsRunnable to mozilla::Runnable, CancelableRunnable to mozilla::CancelableRunnable. r=froydnj 2016-04-25 17:23:21 -07:00
lul Bug 1237151 (part 3) - Remove ignored qualifiers in all remaining code. r=froydnj. 2016-01-05 17:08:45 -08:00
public Bug 1251787 - Remove remaining references to MOZILLA_XPCOMRT_API from tools. r=mstange 2016-02-27 11:12:08 -08:00
tasktracer Merge f-t to m-c, a=merge 2016-01-23 18:11:37 -08:00
tests Bug 1241249 - Add an SPS pseudo entry for JS stack capturing; r=shu 2016-01-20 11:32:00 +01:00
merge-profiles.py Bug 1168784 - Part 1: Fix the script merging profiles to handle new profiler JSON format. r=benwa 2015-06-01 18:09:29 +08:00
moz.build Fix Fennec build on Mac, no bug, NPTOB r=ted 2016-02-08 17:45:27 -06:00
nm-symbolicate.py Bug 1047391 - Use the correct nm binary in nm-symbolicate.py. r=BenWa 2014-08-07 13:23:11 +02:00