Patchwork Fix libbacktrace on 32-bit sparc

login
register
mail settings
Submitter Ian Taylor
Date Oct. 29, 2012, 6:31 p.m.
Message ID <CAKOQZ8xSWdP9uEEiCwgLzuWh3Po6n73xyp=vXtATOxtvf_fdjw@mail.gmail.com>
Download mbox | patch
Permalink /patch/195106/
State New
Headers show

Comments

Ian Taylor - Oct. 29, 2012, 6:31 p.m.
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
David Miller - Oct. 29, 2012, 6:33 p.m.
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.
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 Taylor - Oct. 29, 2012, 6:42 p.m.
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.

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;
 }