__aeabi_memset implementation swaps wrong arguments #633

Closed
opened 2021-10-26 11:17:30 -05:00 by kilograham · 1 comment
kilograham commented 2021-10-26 11:17:30 -05:00 (Migrated from github.com)

memset and __aeabi_memset have second and third parameters in the opposite order.

our pico_mem_ops __aeabi_memset implementation swaps the order before calling the bootrom __memset which has the memset ordering.

Foolishly, the implemention swaps first and second parameters not second and third.

This went unnoticed as the testcase used memset, but GCC always inlines this rather than calling __aeabi_memset

`memset` and `__aeabi_memset` have second and third parameters in the opposite order. our `pico_mem_ops` `__aeabi_memset` implementation swaps the order before calling the bootrom `__memset` which has the `memset` ordering. Foolishly, the implemention swaps first and second parameters not second and third. This went unnoticed as the testcase used memset, but GCC _always_ inlines this rather than calling `__aeabi_memset`
kilograham commented 2021-10-28 15:17:17 -05:00 (Migrated from github.com)

merged into develop

merged into develop
Sign in to join this conversation.
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
gh-raspberrypi/pico-sdk#633
No description provided.