YuuichiNakamura opened a new pull request #2005: URL: https://github.com/apache/incubator-nuttx/pull/2005
## Summary Currently struct note_syscall_leave_s contains a member of uintptr_t (nsc_result). Because note struct is stored with packed in the buffer, nsc_result may placed on unaligned address. If the processor architecture doesn't support unaligned word access (ex. Cortex-M0), accessing nsc_result may crash. This PR fixes the member nsc_result to uint8_t array like nc_pid and nc_systime. ## Impact struct note_syscall_leave_s is changed. All app codes using this must be fixed. (Another PR for apps will be issued.) ## Testing Tested with spresense:nsh Because Cortex-M4 supports unaligned access by default, I have intentionally modified CPU control register to disable unaligned access for test. ``` nsh> mw 0xe000e014=0x208 ``` This crashes "trace dump" command. The PR fixes it. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected]
