зеркало из https://github.com/mozilla/gecko-dev.git
0574002b30
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 |
||
---|---|---|
.. | ||
bloatview | ||
check-moz-style | ||
docs | ||
jprof | ||
leak-gauge | ||
lint | ||
memory | ||
memory-profiler | ||
mercurial | ||
power | ||
profiler | ||
quitter | ||
rb | ||
rewriting | ||
update-packaging | ||
mach_commands.py |