From: Masatake Y. <ya...@re...> - 2013-06-25 14:08:33
|
(I've just joined this list. So I could not set Reply-to properly.) Here is a patch I sent to the strace+ developer. It seems that this is still applicable to Luca's new patch. Masatake YAMATO ==================================================================== Hi, I need following patch to avoid strace+ coredump. Could you merge it the official source tree? Signed-off-by: Masatake YAMATO <ya...@re...> 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); |
From: Luca C. <luc...@gm...> - 2013-06-26 07:15:04
|
On Tue, Jun 25, 2013 at 7:08 AM, Masatake YAMATO <ya...@re...> wrote: > Hi, > > I need following patch to avoid strace+ coredump. > Could you merge it the official source tree? > > > Signed-off-by: Masatake YAMATO <ya...@re...> > > 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 |
From: Masatake Y. <ya...@re...> - 2013-06-26 07:24:42
|
> On Tue, Jun 25, 2013 at 7:08 AM, Masatake YAMATO <ya...@re...> wrote: >> Hi, >> >> I need following patch to avoid strace+ coredump. >> Could you merge it the official source tree? >> >> >> Signed-off-by: Masatake YAMATO <ya...@re...> >> >> 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. Thanks. > Is there a specific program that can trigger this consistently? Sorry, I cannot rememeber the program. I found this bug when I built strace+ without libunwind. So this bug will never hit strace with your patch. > Luca Masatake YAMATO |