You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@qpid.apache.org by "ASF GitHub Bot (Jira)" <ji...@apache.org> on 2020/06/25 17:54:00 UTC

[jira] [Commented] (DISPATCH-1694) sys_thread_self() returns NULL pointer if called by main process thread

    [ https://issues.apache.org/jira/browse/DISPATCH-1694?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17145700#comment-17145700 ] 

ASF GitHub Bot commented on DISPATCH-1694:
------------------------------------------

kgiusti opened a new pull request #768:
URL: https://github.com/apache/qpid-dispatch/pull/768


   


----------------------------------------------------------------
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:
users@infra.apache.org


> sys_thread_self() returns NULL pointer if called by main process thread
> -----------------------------------------------------------------------
>
>                 Key: DISPATCH-1694
>                 URL: https://issues.apache.org/jira/browse/DISPATCH-1694
>             Project: Qpid Dispatch
>          Issue Type: Bug
>          Components: Router Node
>    Affects Versions: 1.13.0
>            Reporter: Ken Giusti
>            Assignee: Ken Giusti
>            Priority: Major
>             Fix For: 1.13.0
>
>
> Since the main process "thread" is not a pthread it does not have a sys_thread_t associated with it.  Since the router uses the main thread as an I/O thread this means that an I/O thread can have a null sys_thread_self() value.
> While technically not _wrong_ it is unexpected; it makes comparing the return value of sys_thread_self() against a null/uninitialized pointer succeed.
> Proposed solution - return a dummy, non-zero value from sys_thread_id() when called from the main thread.  Ensure this value is unique with respect to sys_thread_id() values returned by the "real" pthreads.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@qpid.apache.org
For additional commands, e-mail: dev-help@qpid.apache.org