You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@qpid.apache.org by "Ken Giusti (Jira)" <ji...@apache.org> on 2020/06/29 13:43:00 UTC
[jira] [Resolved] (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:all-tabpanel ]
Ken Giusti resolved DISPATCH-1694.
----------------------------------
Resolution: Fixed
> 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