[haiku-bugs] Re: [Haiku] #5600: pthread_self() sometimes returns NULL

  • From: "bonefish" <trac@xxxxxxxxxxxx>
  • Date: Fri, 19 Mar 2010 20:24:02 -0000

#5600: pthread_self() sometimes returns NULL
------------------------------------+---------------------------------------
  Reporter:  kaliber                |       Owner:  bonefish      
      Type:  bug                    |      Status:  closed        
  Priority:  normal                 |   Milestone:  R1            
 Component:  System/runtime_loader  |     Version:  R1/Development
Resolution:  invalid                |    Keywords:                
 Blockedby:                         |    Platform:  All           
  Blocking:                         |  
------------------------------------+---------------------------------------
Changes (by bonefish):

  * status:  new => closed
  * resolution:  => invalid


Comment:

 libroot's pthread_self() implementation cannot return NULL. I've also
 verified that this is the case for the disassembled gcc4 code. My guess is
 that some library (some of glib libs?) also exports a pthread_self(). That
 would also explain why pre-loading libroot.so or anything that links
 against it fixes the issue, since that puts libroot.so earlier in the
 global shared object list, so that its pthread_self() is found when the
 symbol is search.

 Note that whatever library is responsible might rely on weak symbols being
 supported, which is not the case for Haiku yet. Maybe the library is just
 not configured correctly.

-- 
Ticket URL: <http://dev.haiku-os.org/ticket/5600#comment:1>
Haiku <http://dev.haiku-os.org>
Haiku - the operating system.

Other related posts: