diff options
author | Christopher Faylor <me@cgf.cx> | 2002-10-18 18:02:40 +0400 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2002-10-18 18:02:40 +0400 |
commit | 5d8c2b592de4ecd8c870d1112ae3ecc9a456c8bc (patch) | |
tree | a3acdf3ef30020e6630b77d1d710ad64c3dd9c4f /winsup/cygwin | |
parent | abb58a6d3f5af3ab5badea554280d36113fa1349 (diff) |
* thread.cc (verifyable_object_isvalid): Test for a valid object pointer before
testing for static ptr.
Diffstat (limited to 'winsup/cygwin')
-rw-r--r-- | winsup/cygwin/ChangeLog | 5 | ||||
-rw-r--r-- | winsup/cygwin/thread.cc | 6 |
2 files changed, 8 insertions, 3 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index 28fdf96df..9a84d09c0 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,8 @@ +2002-10-18 Thomas Pfaff <tpfaff@gmx.net> + + * thread.cc (verifyable_object_isvalid): Test for a valid object + pointer before testing for static ptr. + 2002-10-17 Christopher Faylor <cgf@redhat.com> * dtable.cc (dtable::init_std_file_from_handle): Force "devices" to diff --git a/winsup/cygwin/thread.cc b/winsup/cygwin/thread.cc index bf44faa34..42be6ca2c 100644 --- a/winsup/cygwin/thread.cc +++ b/winsup/cygwin/thread.cc @@ -1098,7 +1098,7 @@ pthread_mutex::isGoodInitializerOrObject (pthread_mutex_t const *mutex) return true; } -bool +bool pthread_mutex::isGoodInitializerOrBadObject (pthread_mutex_t const *mutex) { verifyable_object_state objectState = verifyable_object_isvalid (mutex, PTHREAD_MUTEX_MAGIC, PTHREAD_MUTEX_INITIALIZER); @@ -1365,10 +1365,10 @@ verifyable_object_state verifyable_object_isvalid (void const * objectptr, long magic, void *static_ptr) { verifyable_object **object = (verifyable_object **)objectptr; - if (static_ptr && *object == static_ptr) - return VALID_STATIC_OBJECT; if (check_valid_pointer (object)) return INVALID_OBJECT; + if (static_ptr && *object == static_ptr) + return VALID_STATIC_OBJECT; if (!*object) return INVALID_OBJECT; if (check_valid_pointer (*object)) |