If srtp_create fails while adding streams, it deallocates the session
but doesn't clear the passed pointer which then could lead to a
double-free in the SrtpSession dtor.
The CL also adds locking for libsrtp initialization / shutdown.
BUG=4042
R=jiayl@webrtc.org, juberti@google.com, pthatcher@webrtc.org
Review URL: https://webrtc-codereview.appspot.com/47319004
Cr-Commit-Position: refs/heads/master@{#9300}
Removes FixedSizeLockFreeQueue which isn't used anymore. This enabled
moving rtc::AtomicOps to webrtc/base/atomicops.h where they should be.
BUG=4330
R=tommi@webrtc.org
Review URL: https://webrtc-codereview.appspot.com/51789004
Cr-Commit-Position: refs/heads/master@{#9120}
This class is being used from both libjingle and webrtc but we recently had a regression when we added dependency on libjingle's Thread class. This cleans that up and moves the implementation of CriticalSection and helper classes into the source file.
I'm also improving debugging facilities and constness.
BUG=
R=magjed@webrtc.org
Review URL: https://webrtc-codereview.appspot.com/51769004
Cr-Commit-Position: refs/heads/master@{#9089}
The problem we were running into on the Mac 10.9 debug bot in Chrome turned out to be good ol'fashion memory corruption. Part of webrtc was being compiled with _DEBUG, another half without it. This caused the definition of some symbols to be out of sync (notably pthread_mutex_t) and would cause code built from common.gypi, to overwrite memory allocated via common types from base/base.gypi derived code. Fun stuff to track down. This was a problem in particular with base/criticalsection.h since it's inlined into multiple object files but will have different definitions of what a mutex is.
TBR=pbos,kjellander
BUG=
Review URL: https://webrtc-codereview.appspot.com/43659004
Cr-Commit-Position: refs/heads/master@{#8646}
git-svn-id: http://webrtc.googlecode.com/svn/trunk@8646 4adac7df-926f-26a2-2b94-8c16560cd09d
Local testing indicates that the pthread_t member variable might be causing alignment problems on the Chromium bots. After landing this (and once the Chromium tree is open again), I'll try a roll again to see if this has an effect.
R=magjed@webrtc.org
Review URL: https://webrtc-codereview.appspot.com/48449004
Cr-Commit-Position: refs/heads/master@{#8644}
git-svn-id: http://webrtc.googlecode.com/svn/trunk@8644 4adac7df-926f-26a2-2b94-8c16560cd09d
To do this, I'm removing ThreadChecker's dependency on the 'Thread' class, so that the checker works with any thread and doesn't rely on TLS.
Also simplifying CriticalSection's implementation on Windows since a critical section on Windows already knows what thread currently owns the lock.
BUG=
R=mflodman@webrtc.org
Review URL: https://webrtc-codereview.appspot.com/40539004
git-svn-id: http://webrtc.googlecode.com/svn/trunk@8151 4adac7df-926f-26a2-2b94-8c16560cd09d