Sort locks by their guestaddr to make the error output independent
of the dynamically allocated Lock addresses.
This restores helgrind/tests/locked_vs_unlocked2.stderr.exp
from r14931.

While regtesting the patch I've observed intermittent failures
of helgrind/tests/hg05_race2 like so:

--- ../../helgrind/tests/hg05_race2.stderr.exp  (revision 15001)
+++ ../../helgrind/tests/hg05_race2.stderr.exp  (working copy)
@@ -26,8 +26,7 @@
    at 0x........: th (hg05_race2.c:17)
    by 0x........: mythread_wrapper (hg_intercepts.c:...)
    ...
- Location 0x........ is 0 bytes inside foo.poot[5].plop[11],
- declared at hg05_race2.c:24, in frame #x of thread x
+ Address 0x........ is on thread #x's stack
 
 ----------------------------------------------------------------
 
@@ -42,8 +41,7 @@
    at 0x........: th (hg05_race2.c:17)
    by 0x........: mythread_wrapper (hg_intercepts.c:...)
    ...
- Location 0x........ is 0 bytes inside foo.poot[5].plop[11],
- declared at hg05_race2.c:24, in frame #x of thread x
+ Address 0x........ is on thread #x's stack

Surely, that's something else.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15009 a5019735-40e9-0310-863c-91ae7b9d1cf9
3 files changed