Due to timing problem, test was not properly testing.
What needs to be ensured is:
   vgdb is attached (i.e. is ptracing valgrind)
   2 sigusr1 signals are sent while vgdb is ptracing
     vgdb will queue these signals
   when continuing, the queued signals are delivered.

With 3.9.0, the above causes an internal error in valgrind:
valgrind: m_syswrap/syswrap-main.c:1436 (vgPlain_client_syscall): Assertion 'sci->status.what == SsIdle' failed.

It would be better to have explicit synchronisation in the test
rather than counting on 'sleep xxx' to have things done in the
order that tests the signal queueing.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13910 a5019735-40e9-0310-863c-91ae7b9d1cf9
Improve the comments in the test


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13911 a5019735-40e9-0310-863c-91ae7b9d1cf9
Make the test (more) deterministic by having send_signal using
a guardcmd before sending the signal.
This allows to be sure that the signal are emitted when vgdb
is attached.
We still have one 'sleep' in the test.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13912 a5019735-40e9-0310-863c-91ae7b9d1cf9
Filter lines such as:
+38     ../sysdeps/unix/sysv/linux/_exit.c: No such file or directory.

This should make nlgone_exit work on s390 suse and x86_64 suse


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13913 a5019735-40e9-0310-863c-91ae7b9d1cf9
Add a new test that shows a surprising side effect of the
medium resolution (4 callers) used to compare errors.

To look at the strange side effect, do:
  ./vg-in-place -v --suppressions=memcheck/tests/suppfreecollision.supp memcheck/tests/suppfree activatenondangerouserror

You obtain at the end:
...
--19240-- used_suppression:      2 suppressnondangerouserror memcheck/tests/suppfreecollision.supp:2
...

showing that the suppression aiming at suppressing a nondangerous error has in fact
suppressed more than expected.

This is because m_errormgr.c compares the exe_context in medium resolution/4 calls
(or low resolution/2 calls  once 100 errors have been collected).

The error machinery first encounters the non dangerous error. This error is suppressed,
because all callers match the suppression entry. In particular, we have
in the stacktrace the function ok_to_suppress_double_free_from_this_fun

Then the error machinery encounters the second error.
The stacktrace of the 2nd error has the same first 4 callers than the non
dangerous error. So the 2nd error is considered equal to the first one
and is (unexpectedly in my opinion) suppressed.

This looks a bug (or at least something very surprising).
(the doc mentions the fact that errors are 'commoned up' on 4 callers, but
I am not sure the above side effect was understood).


There are several ways this can be improved, some are more easier than other
  * have   --error-resolution=low/med/high
    similar to the memcheck   --leak-resolution=low/med/high
     (which default value would we take for this new clo ?)

  * have a lot more intelligent error comparison:
      when comparing an error with a suppressed error, one must
      check that the callers used for suppression are equal.
     This looks difficult to implement and probably a significant slow down
     in the error machinery, which will impact applications producing
     many suppressed errors (e.g. helgrind + some pthread lib errors).
     This also implies more memory (e.g. one byte per caller in the
     error, to indicate which caller(s) were used to suppress.
     Still wondering what to do with * and ... ?

  * have a somewhat more intelligent error comparison:
     Instead of comparing only the callers used for suppression, we
     compare the range first..last caller used (so including some
     callers in the range that were not used to suppressed if e.g.
     a ... matching was put in the supp entry).
     Probably still a slowdown (less than previous solution ?)
     and less memory than the previous solution.
     But also not completely clear how to compute the range.

  * always re-evaluate the suppression : this will very probably be
    a significant slow down.

  * do nothing, as nobody complained about this behaviour up to now :)

  * ??? any other idea



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13914 a5019735-40e9-0310-863c-91ae7b9d1cf9
clo_processing is now done when this procedure is called.
So, we can now allocate this memory only when approx history level
is requested.

I double checked using printf that clo processing was done before
this procedure is called.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13915 a5019735-40e9-0310-863c-91ae7b9d1cf9
Increase some sleep time to (try to) avoid some failure.
With the new sleep time, no failure on 1200 runs of the test.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13916 a5019735-40e9-0310-863c-91ae7b9d1cf9