diff mbox

Fix libbacktrace on 32-bit sparc

Message ID CAKOQZ8xSWdP9uEEiCwgLzuWh3Po6n73xyp=vXtATOxtvf_fdjw@mail.gmail.com
State New
Headers show

Commit Message

Ian Lance Taylor Oct. 29, 2012, 6:31 p.m. UTC
On Mon, Oct 29, 2012 at 11:15 AM, David Miller <davem@davemloft.net> wrote:
> From: Ian Lance Taylor <iant@google.com>
> 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.

Ah, yes, sorry.

Could you test this patch?

Ian

Comments

David Miller Oct. 29, 2012, 6:33 p.m. UTC | #1
From: Ian Lance Taylor <iant@google.com>
Date: Mon, 29 Oct 2012 11:31:33 -0700

> On Mon, Oct 29, 2012 at 11:15 AM, David Miller <davem@davemloft.net> wrote:
>> From: Ian Lance Taylor <iant@google.com>
>> 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.
> 
> Ah, yes, sorry.
> 
> Could you test this patch?

Will do, hopefully before ConEd turns my power off.
David Miller Oct. 29, 2012, 6:40 p.m. UTC | #2
From: David Miller <davem@davemloft.net>
Date: Mon, 29 Oct 2012 14:33:33 -0400 (EDT)

> From: Ian Lance Taylor <iant@google.com>
> Date: Mon, 29 Oct 2012 11:31:33 -0700
> 
>> On Mon, Oct 29, 2012 at 11:15 AM, David Miller <davem@davemloft.net> wrote:
>>> From: Ian Lance Taylor <iant@google.com>
>>> 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.
>> 
>> Ah, yes, sorry.
>> 
>> Could you test this patch?
> 
> Will do, hopefully before ConEd turns my power off.

Yep, this works, thanks!
Ian Lance Taylor Oct. 29, 2012, 6:42 p.m. UTC | #3
On Mon, Oct 29, 2012 at 11:40 AM, David Miller <davem@davemloft.net> wrote:
> From: David Miller <davem@davemloft.net>
> Date: Mon, 29 Oct 2012 14:33:33 -0400 (EDT)
>
>> From: Ian Lance Taylor <iant@google.com>
>> Date: Mon, 29 Oct 2012 11:31:33 -0700
>>
>>> On Mon, Oct 29, 2012 at 11:15 AM, David Miller <davem@davemloft.net> wrote:
>>>> From: Ian Lance Taylor <iant@google.com>
>>>> 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.
>>>
>>> Ah, yes, sorry.
>>>
>>> Could you test this patch?
>>
>> Will do, hopefully before ConEd turns my power off.
>
> Yep, this works, thanks!

Great, thanks for testing it!

Committed to mainline.

Ian

2012-10-29  Ian Lance Taylor  <iant@google.com>

	* mmap.c (backtrace_vector_release): Correct last patch: add
	aligned, not size.
diff mbox

Patch

Index: mmap.c
===================================================================
--- mmap.c	(revision 192945)
+++ mmap.c	(working copy)
@@ -240,7 +240,8 @@  backtrace_vector_release (struct backtra
   aligned = (size + 7) & ~ (size_t) 7;
   alc -= aligned - size;

-  backtrace_free (state, (char *) vec->base + size, alc, error_callback, data);
+  backtrace_free (state, (char *) vec->base + aligned, alc,
+		  error_callback, data);
   vec->alc = 0;
   return 1;
 }