Bug Report: Unaligned Access in BGP Code on ARMv7 Platforms
nick
vincent at systemli.org
Tue Dec 10 21:15:46 CET 2024
I also uploaded the coredumpfile:
https://github.com/PolynomialDivision/coredumpupload/blob/main/bird_coredump
On 12/10/24 8:56 PM, nick via Bird-users wrote:
> Sorry for the long response time.
>
> Here is the requested output:
>
>> Program received signal SIGBUS, Bus error.
>> 0x00056fc0 in bgp_get_prefix (path_id=0, net=0xb6f0709c,
>> c=0xb6ee9bc0) at proto/bgp/attrs.c:1710
>> 1710 proto/bgp/attrs.c: No such file or directory.
>> (gdb) p sizeof(struct mblock)
>> $1 = 16
>> (gdb) p px
>> $2 = (struct bgp_prefix *) 0xb6eac01c
>> (gdb) p (uintptr_t)px % 4
>> $3 = 0
>> (gdb) p (uintptr_t)px % 8
>> $4 = 4
>
> On 12/6/24 3:16 AM, Ondrej Zajicek wrote:
>> On Thu, Dec 05, 2024 at 11:35:13PM +0100, nick via Bird-users wrote:
>>> Dear BIRD Community,
>>>
>>> I am writing to report a bug observed in the BGP implementation on
>>> ARMv7
>>> platforms, which results in a SIGBUS error due to unaligned memory
>>> access in
>>> the NEON assembler code. I debugged this issue on version 2.15.1 of
>>> BIRD.
>>>
>>> The root cause appears to be insufficient alignment of memory
>>> allocated for
>>> structures, specifically in this line:
>>>
>>> ```c
>>> px = mb_alloc(c->pool, sizeof(struct bgp_prefix) + net->length);
>>> ```
>> Hello
>>
>> Thanks for the report, can you get from your crash the pointer /
>> aligment of
>> 'px' and also get sizeof(struct mblock) in your build?
>>
More information about the Bird-users
mailing list