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

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

asfgit closed 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:
[email protected]


> 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: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to