xiaoxiang781216 commented on code in PR #20822:
URL: https://github.com/apache/nuttx/pull/20822#discussion_r4399479524
##########
arch/arm64/src/common/arm64_fatal.c:
##########
@@ -675,19 +831,31 @@ uint64_t *arm64_fatal_handler(uint64_t *regs)
* the register dump to the paths that are fatal.
*/
- ptcb = nxsched_get_tcb(tcb->group->tg_pid);
+ if (report)
+ {
+ ptcb = nxsched_get_tcb(tcb->group->tg_pid);
- _alert("Segmentation fault in %s (PID %d: %s)\n",
- ptcb != NULL ? get_task_name(ptcb) : "<gone>",
- tcb->pid, get_task_name(tcb));
- _alert("Reason: %s - %s\n", reason, desc);
+ _alert("Segmentation fault in %s (PID %d: %s)\n",
+ ptcb != NULL ? get_task_name(ptcb) : "<gone>",
+ tcb->pid, get_task_name(tcb));
+ _alert("Reason: %s - %s\n", reason, desc);
+ }
- tcb->flags |= TCB_FLAG_FORCED_CANCEL;
+ if (resume)
+ {
+ /* Return from memcpy() or memset() to its caller */
Review Comment:
why not always exit the current process
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]