[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: libsbc1: compiling with gcc > 4.9 causes stack corruption



Hello,

On 04/26/2017 09:34 AM, Niels Thykier wrote:
> On Mon, 17 Apr 2017 17:02:32 +0100 Paul Brook <paul@nowt.org> wrote:
>> Package: libsbc1
>> Version: 1.3-1+b2
>> Followup-For: Bug #856487
>>
>> Not a stack corruption.
>>
>> This is miscompilation of sbc_analyze_4b_8s_armv6.  gcc appears to look
>> into the asm function and decides that it does not clobber r3 (which the
>> normal ARM ABI says is call clobbered).  The last out += out_stride ends
>> up incrementing the pointer by an arbitrary amount.
>>
> 
> Hi Paul,
> 
> Many thanks for finding the bug and the solution to it.
> 
>> The attached patch works around the bug.
>>
> 
> @Bluetooth maintainers: Could you please apply the patch below for stretch?

FTR: I replied to the patch message but without Ccing debian-arm. See
https://bugs.debian.org/856487#142 .

TL;DR: The patch makes it better and fix the problem for now, but is not
safe.

Best regards
Uwe

Attachment: signature.asc
Description: OpenPGP digital signature


Reply to: