https://bugs.kde.org/show_bug.cgi?id=396290

--- Comment #27 from roger.li...@cedalo.com ---
I've just added some updated patches. The two small ones add some coregrind
features that are needed for this tool - implementing VG_(apply_ExeContext)()
and adding a way for a tool to force a syscall to fail in the pre_syscall
callback.

The big one is the patch for the tool. This now has a lot of control over how
the allocation failures occur. It can be turned on/off at the start of the run,
set to toggle on entry and exit from named functions, limited to a certain
number of failures per run, automatically accepted based on size of allocation
requested, automatically accepted based on matching function name,
automatically accepted based on a dice roll, or to some degree controlled with
gdb  or client requests.

It also implements syscall failures, which is turned off by default. If you
turn it on, then all syscalls (bar those that are marked as always succeeding)
will fail with errno set to EINVAL. You can change to have all syscalls fail
with a different errno, and/or set individual syscalls to fail with specific
errors. You can set all syscalls with a matching name to be automatically
accepted. You can set all syscalls that aren't given a specific error to be
automatically accepted. You can accept based on the number of failures in a
run, or based on a dice roll, or to some degree controlled with gdb or client
requests.

There are tests for most features, but they haven't been tried on different
Linux releases or distributions (Kubuntu 18.04 only) nor on Mac or Solaris.

The documentation is pretty complete with examples for most situations.

The bits that are missing - I've taken a lot of code from callgrind to support
the function enter/leave feature, but I may have taken too much out. The bit
that needs looking at is function name wildcard support which I initially
removed but now see it was included in callgrind to allow C++ names to be dealt
with correctly. That needs putting back in, but I could do with a break from
this for a few days at least and was hoping for some feedback.

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to