mkiiskila commented on a change in pull request #474: PIC32: Fix stack align URL: https://github.com/apache/mynewt-core/pull/474#discussion_r130982969
########## File path: kernel/os/include/os/arch/pic32/os/os_arch.h ########## @@ -38,7 +38,8 @@ typedef uint32_t os_sr_t; /* Stack type, aligned to a 32-bit word. */ #define OS_STACK_PATTERN (0xdeadbeef) -typedef uint32_t os_stack_t; +/* uint64_t in an attempt to get the stack 8 aligned */ +typedef uint64_t os_stack_t; Review comment: I would also adjust stack_top in os_arch_task_stack_init(), if it was not aligned on 8-byte boundary. The use case that would worry me is where user allocates the stack with malloc(), as opposed to declaring a global variable. malloc() might, or might not, be returning 8-byte aligned data. typedef'ing os_stack_t as uint64, or adding that aligned() attribute seems useful also. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services