[RFC] print stack trace after each syscall

Luca Clementi luca.clementi at gmail.com
Wed Jun 26 07:14:56 UTC 2013


On Tue, Jun 25, 2013 at 7:08 AM, Masatake YAMATO <yamato at redhat.com> wrote:
> Hi,
>
> I need following patch to avoid strace+ coredump.
> Could you merge it the official source tree?
>
>
> Signed-off-by: Masatake YAMATO <yamato at redhat.com>
>
> diff --git a/syscall.c b/syscall.c
> index a569a65..1b8f613 100644
> --- a/syscall.c
> +++ b/syscall.c
> @@ -2923,7 +2923,7 @@ print_normalized_addr(struct tcb* tcp, unsigned long addr) {
>         // since tcp->mmap_cache is sorted, do a binary search to find the cache entry
>         // that contains addr
>         int lower = 0;
> -       int upper = tcp->mmap_cache_size;
> +       int upper = tcp->mmap_cache_size - 1;
>
>         while (lower <= upper) {
>                 int mid = (int)((upper + lower) / 2);
>

Hey Masatake,
thanks for the fix! Ill include it.

Is there a specific program that can trigger this consistently?

Luca




More information about the Strace-devel mailing list