#4 FIXES CRASH on 0.3.0: POSIX Uphold pthread's specification

open
nobody
None
9
2006-05-06
2006-02-23
No

Do not try to use a pthread_mutexattr_t variable
without first initializing it with
pthread_mutexattr_init(3)

The patch allows libjingle to compile under FreeBSD and
possibly other OSs which strictly follow the pthreads
standard which says nothing about pthread_mutexattr_t
other than there is a function to do it. Therefore,
assuming that using pthread_mutexattr_t without
initializing it is not guaranteed to work.

Discussion

  • Mario Sergio Fujikawa Ferreira

    Logged In: YES
    user_id=746415

    Affected file:

    talk/base/criticalsection.h

     
  • Mario Sergio Fujikawa Ferreira

    • summary: FreeBSD - POSIX Initialize pthread_mutexattr_t --> Pthread POSIX - Uphold pthread's specification
     
  • Mario Sergio Fujikawa Ferreira

    Logged In: YES
    user_id=746415

    Furthermore, there should be a matching
    pthread_mutexattr_destroy() for each
    pthread_mutexattr_init().

    Affected file:

    talk/base/thread.cc

     
  • Mario Sergio Fujikawa Ferreira

    • priority: 5 --> 9
    • summary: Pthread POSIX - Uphold pthread's specification --> Pthread POSIX - Uphold pthread's specification (FIXES CRASH)
     
  • Mario Sergio Fujikawa Ferreira

    Logged In: YES
    user_id=746415

    Affected file:

    talk/session/phone/linphonemediaengine.cc

     
  • Mario Sergio Fujikawa Ferreira

    • summary: Pthread POSIX - Uphold pthread's specification (FIXES CRASH) --> FIXES CRASH: Pthread POSIX - Uphold pthread's specification
     
  • Mario Sergio Fujikawa Ferreira

    • summary: FIXES CRASH: Pthread POSIX - Uphold pthread's specification --> FIXES CRASH on 0.3.0: POSIX Uphold pthread's specification
     
  • Mario Sergio Fujikawa Ferreira

    Logged In: YES
    user_id=746415

    Also, every pthread_mutexattr_init() requires a matching
    pthread_mutexattr_destroy() since the definition of
    pthread_mutexattr_t is unknown

     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks