You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by "xiaoxiang781216 (via GitHub)" <gi...@apache.org> on 2023/05/17 17:38:05 UTC
[GitHub] [nuttx] xiaoxiang781216 commented on pull request #9296: arch: Save sigdeliver into xcp in the case of signal self delevery
xiaoxiang781216 commented on PR #9296:
URL: https://github.com/apache/nuttx/pull/9296#issuecomment-1551808721
> There is no explanation how this change fixes the recursion problem. Perhaps I just don't understand the failure case.
>
> * The basic change is just moving the location of the statement tcb->xcp.sigdeliver = sigdeliver; Right? It is set too late?
It is not only too late, but also forget to set tcb->xcp.sigdeliver to non-zero value. it's important to change tcb->xcp.sigdeliver to non-zero before invoking the user supplied callback since arch code use this value to avoid the recursive dispatch.
> * Does tcb->xcp.sigdeliver == NULL mean that there is no signal handler active?
> * But tcb->xcp.sigdeliver == NULL while the signal handler is active
> * So this change prevents delivering the signal while the signal is active
>
Yes.
> Do I understand that correctly. In that case, this is a correct change in any case. But I think we still need to verify that the sigprocmask logic is in place to prohibit any nested signal handler at all.
Yes, both patch are needed.
--
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: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org