Re: [PATCH] Fix libbacktrace on 32-bit sparc

2012-10-29 Thread Ian Lance Taylor
On Mon, Oct 29, 2012 at 11:40 AM, David Miller wrote: > From: David Miller > Date: Mon, 29 Oct 2012 14:33:33 -0400 (EDT) > >> From: Ian Lance Taylor >> Date: Mon, 29 Oct 2012 11:31:33 -0700 >> >>> On Mon, Oct 29, 2012 at 11:15 AM, David Miller wrote: From: Ian Lance Taylor Date: Mon,

Re: [PATCH] Fix libbacktrace on 32-bit sparc

2012-10-29 Thread David Miller
From: David Miller Date: Mon, 29 Oct 2012 14:33:33 -0400 (EDT) > From: Ian Lance Taylor > Date: Mon, 29 Oct 2012 11:31:33 -0700 > >> On Mon, Oct 29, 2012 at 11:15 AM, David Miller wrote: >>> From: Ian Lance Taylor >>> Date: Mon, 29 Oct 2012 11:13:19 -0700 >>> I changed it from vec->base

Re: [PATCH] Fix libbacktrace on 32-bit sparc

2012-10-29 Thread David Miller
From: Ian Lance Taylor Date: Mon, 29 Oct 2012 11:31:33 -0700 > On Mon, Oct 29, 2012 at 11:15 AM, David Miller wrote: >> From: Ian Lance Taylor >> Date: Mon, 29 Oct 2012 11:13:19 -0700 >> >>> I changed it from vec->base + vec->size. Now it is vec->base >>> + size, where size is the aligned vers

Re: [PATCH] Fix libbacktrace on 32-bit sparc

2012-10-29 Thread Ian Lance Taylor
On Mon, Oct 29, 2012 at 11:15 AM, David Miller wrote: > From: Ian Lance Taylor > Date: Mon, 29 Oct 2012 11:13:19 -0700 > >> I changed it from vec->base + vec->size. Now it is vec->base >> + size, where size is the aligned version of vec->size. > > It is not. > > You don't modify 'size' at all.

Re: [PATCH] Fix libbacktrace on 32-bit sparc

2012-10-29 Thread David Miller
From: Ian Lance Taylor Date: Mon, 29 Oct 2012 11:13:19 -0700 > I changed it from vec->base + vec->size. Now it is vec->base > + size, where size is the aligned version of vec->size. It is not. You don't modify 'size' at all.

Re: [PATCH] Fix libbacktrace on 32-bit sparc

2012-10-29 Thread David Miller
From: Ian Lance Taylor Date: Mon, 29 Oct 2012 11:13:19 -0700 > Sure, if you can confirm that this patch fails, I will take another look. It fails. Same problem, SIGBUS.

Re: [PATCH] Fix libbacktrace on 32-bit sparc

2012-10-29 Thread Ian Lance Taylor
On Mon, Oct 29, 2012 at 11:03 AM, David Miller wrote: > From: Ian Lance Taylor > Date: Mon, 29 Oct 2012 08:43:42 -0700 > >> This patch should fix it. Bootstrapped and ran libbacktrace testsuite >> on x86_64-unknown-linux-gnu. Committed to mainline. > > I can tell just by looking at your patch t

Re: [PATCH] Fix libbacktrace on 32-bit sparc

2012-10-29 Thread David Miller
From: Ian Lance Taylor Date: Mon, 29 Oct 2012 08:43:42 -0700 > This patch should fix it. Bootstrapped and ran libbacktrace testsuite > on x86_64-unknown-linux-gnu. Committed to mainline. I can tell just by looking at your patch that it doesn't fix the problem. It's "vec->base + vec->size" tha

Re: [PATCH] Fix libbacktrace on 32-bit sparc

2012-10-29 Thread Ian Lance Taylor
On Sat, Oct 27, 2012 at 10:12 PM, David Miller wrote: > From: David Miller > Date: Sun, 28 Oct 2012 00:31:27 -0400 (EDT) > >> The size is 24, and my patch definitely makes the crashes go away. >> >> It seems like a vector is being used for a mixed set of objects. >> I'll try to figure out how tha

Re: [PATCH] Fix libbacktrace on 32-bit sparc

2012-10-27 Thread David Miller
From: David Miller Date: Sun, 28 Oct 2012 00:31:27 -0400 (EDT) > The size is 24, and my patch definitely makes the crashes go away. > > It seems like a vector is being used for a mixed set of objects. > I'll try to figure out how that is happening. Ok, the problem seems to have to do with relea

Re: [PATCH] Fix libbacktrace on 32-bit sparc

2012-10-27 Thread David Miller
From: Ian Lance Taylor Date: Sat, 27 Oct 2012 21:06:59 -0700 > The struct used by add_function_range is > > struct function_addrs > { > uint64_t low; > uint64_t high; > struct function *function; > }; > > So on a 32-bit system, this should have a size of 20 if uint64_t > requires 4-byte

Re: [PATCH] Fix libbacktrace on 32-bit sparc

2012-10-27 Thread Ian Lance Taylor
On Fri, Oct 26, 2012 at 9:27 PM, David Miller wrote: > > I'm getting a SIGBUS on every backtrace libbacktrace generates > on 32-bit sparc builds. The crashes usually happen in > add_function_range(), where 'p' is not 8-byte aligned. > > It seems that the vector code doesn't take care to align the