diff options
Diffstat (limited to 'ACE')
-rw-r--r-- | ACE/ChangeLog | 14 | ||||
-rw-r--r-- | ACE/ace/Hash_Cache_Map_Manager_T.cpp | 6 | ||||
-rw-r--r-- | ACE/ace/Log_Msg.cpp | 2 | ||||
-rw-r--r-- | ACE/ace/OS_NS_Thread.inl | 8 | ||||
-rw-r--r-- | ACE/ace/OS_NS_stdio.inl | 6 | ||||
-rw-r--r-- | ACE/ace/OS_NS_sys_mman.inl | 4 | ||||
-rw-r--r-- | ACE/ace/OS_NS_sys_socket.inl | 2 | ||||
-rw-r--r-- | ACE/ace/OS_NS_unistd.inl | 8 |
8 files changed, 43 insertions, 7 deletions
diff --git a/ACE/ChangeLog b/ACE/ChangeLog index 2bf9720b715..f8ff71add99 100644 --- a/ACE/ChangeLog +++ b/ACE/ChangeLog @@ -1,3 +1,17 @@ +Fri Sep 21 16:34:47 UTC 2007 Abdullah Sowayan <abdullah.sowayan@lmco.com> + + * ace/Hash_Cache_Map_Manager_T.cpp: + * ace/Log_Msg.cpp: + * ace/OS_NS_Thread.inl: + * ace/OS_NS_stdio.inl: + * ace/OS_NS_sys_mman.inl: + * ace/OS_NS_sys_socket.inl: + * ace/OS_NS_unistd.inl: + + Fixed ACE_OS fuzz warnings. Use ACE_OS calls instead of raw OS functions + where possible. If fuzz detected a false-positive, then disable + the ACE_OS fuzz check for that section of the code. + Fri Sep 21 17:19:52 UTC 2007 Ossama Othman <ossama_othman at symantec dot com> * ace/INET_Addr.cpp (get_host_name_i): diff --git a/ACE/ace/Hash_Cache_Map_Manager_T.cpp b/ACE/ace/Hash_Cache_Map_Manager_T.cpp index 5baac0ae1a0..86af4960a85 100644 --- a/ACE/ace/Hash_Cache_Map_Manager_T.cpp +++ b/ACE/ace/Hash_Cache_Map_Manager_T.cpp @@ -36,9 +36,9 @@ ACE_Hash_Cache_Map_Manager<ACE_T2>::~ACE_Hash_Cache_Map_Manager (void) } template <ACE_T1> int -ACE_Hash_Cache_Map_Manager<ACE_T2>:: bind (const KEY &key, - const VALUE &value, - CACHE_ENTRY *&entry) +ACE_Hash_Cache_Map_Manager<ACE_T2>::bind (const KEY &key, + const VALUE &value, + CACHE_ENTRY *&entry) { // Insert a entry which has the <key> and the <cache_value> which is // the combination of the <value> and the attributes of the caching diff --git a/ACE/ace/Log_Msg.cpp b/ACE/ace/Log_Msg.cpp index 34bb2d88477..37e787bc4f8 100644 --- a/ACE/ace/Log_Msg.cpp +++ b/ACE/ace/Log_Msg.cpp @@ -135,7 +135,9 @@ public: static int init_backend (const u_long *flags = 0); #if defined (ACE_MT_SAFE) && (ACE_MT_SAFE != 0) + //FUZZ: disable check_for_lack_ACE_OS static void close (void); + //FUZZ: enable check_for_lack_ACE_OS static ACE_Recursive_Thread_Mutex *get_lock (void); diff --git a/ACE/ace/OS_NS_Thread.inl b/ACE/ace/OS_NS_Thread.inl index af4ff0decd1..9dfa5a4825b 100644 --- a/ACE/ace/OS_NS_Thread.inl +++ b/ACE/ace/OS_NS_Thread.inl @@ -3016,7 +3016,9 @@ ACE_OS::thr_kill (ACE_thread_t thr_id, int signum) if (tid == ERROR) return -1; else + //FUZZ: disable check_for_lack_ACE_OS ACE_OSCALL_RETURN (::kill (tid, signum), int, -1); + //FUZZ: enable check_for_lack_ACE_OS # else ACE_UNUSED_ARG (thr_id); @@ -3239,7 +3241,7 @@ ACE_OS::thr_setprio (ACE_hthread_t ht_id, int priority, int policy) # else int result; struct sched_param param; - memset ((void *) ¶m, 0, sizeof param); + ACE_OS::memset ((void *) ¶m, 0, sizeof param); // If <policy> is -1, we don't want to use it for // pthread_setschedparam(). Instead, obtain policy from @@ -3314,11 +3316,15 @@ ACE_OS::thr_sigsetmask (int how, // platform, define ACE_LACKS_PTHREAD_THR_SIGSETMASK. # if defined (ACE_HAS_PTHREADS_DRAFT4) || \ defined (ACE_HAS_PTHREADS_DRAFT6) || (defined (_UNICOS) && _UNICOS == 9) + //FUZZ: disable check_for_lack_ACE_OS ACE_OSCALL_RETURN (::sigprocmask (how, nsm, osm), int, -1); + //FUZZ: enable check_for_lack_ACE_OS # elif !defined (ACE_LACKS_PTHREAD_SIGMASK) int result; + //FUZZ: disable check_for_lack_ACE_OS ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::pthread_sigmask (how, nsm, osm), result), int, -1); + //FUZZ: enable check_for_lack_ACE_OS # endif /* ACE_HAS_PTHREADS_DRAFT4 || ACE_HAS_PTHREADS_DRAFT6 || _UNICOS 9 */ #if 0 diff --git a/ACE/ace/OS_NS_stdio.inl b/ACE/ace/OS_NS_stdio.inl index ecd0d725abd..ecae695c99a 100644 --- a/ACE/ace/OS_NS_stdio.inl +++ b/ACE/ace/OS_NS_stdio.inl @@ -430,15 +430,15 @@ ACE_OS::cuserid (char *user, size_t maxlen) struct passwd *pw = 0; // Make sure the file pointer is at the beginning of the password file - ::setpwent (); + ACE_OS::setpwent (); // Should use ACE_OS::setpwent() but I didn't want to move this // method after it. // Use the effective user ID to determine the user name. - pw = ::getpwuid (::geteuid ()); + pw = ::getpwuid (ACE_OS::geteuid ()); // Make sure the password file is closed. - ::endpwent (); + ACE_OS::endpwent (); if (pw == 0) { diff --git a/ACE/ace/OS_NS_sys_mman.inl b/ACE/ace/OS_NS_sys_mman.inl index d241c922c92..743b87bc90b 100644 --- a/ACE/ace/OS_NS_sys_mman.inl +++ b/ACE/ace/OS_NS_sys_mman.inl @@ -149,6 +149,7 @@ ACE_OS::mmap (void *addr, # if defined (ACE_OPENVMS) ::fsync(file_handle); # endif + //FUZZ: disable check_for_lack_ACE_OS ACE_OSCALL_RETURN ((void *) ::mmap ((ACE_MMAP_TYPE) addr, len, prot, @@ -156,6 +157,7 @@ ACE_OS::mmap (void *addr, file_handle, off), void *, MAP_FAILED); + //FUZZ: enable check_for_lack_ACE_OS #else ACE_UNUSED_ARG (addr); ACE_UNUSED_ARG (len); @@ -258,7 +260,9 @@ ACE_OS::shm_open (const ACE_TCHAR *filename, #endif ACE_OSCALL_RETURN (::shm_open (ACE_TEXT_ALWAYS_CHAR(filename), mode, perms), ACE_HANDLE, ACE_INVALID_HANDLE); #elif defined (ACE_OPENVMS) + //FUZZ: disable check_for_lack_ACE_OS ACE_OSCALL_RETURN (::open (filename, mode, perms, ACE_TEXT("shr=get,put,upd")), ACE_HANDLE, ACE_INVALID_HANDLE); + //FUZZ: enable check_for_lack_ACE_OS #else /* ! ACE_HAS_SHM_OPEN */ // Just use ::open. return ACE_OS::open (filename, mode, perms, sa); diff --git a/ACE/ace/OS_NS_sys_socket.inl b/ACE/ace/OS_NS_sys_socket.inl index 14afb257b77..93819641a3f 100644 --- a/ACE/ace/OS_NS_sys_socket.inl +++ b/ACE/ace/OS_NS_sys_socket.inl @@ -122,7 +122,9 @@ ACE_OS::closesocket (ACE_HANDLE handle) ACE_SOCKCALL_RETURN (::closesocket ((SOCKET) handle), int, -1); #else + //FUZZ: disable check_for_lack_ACE_OS ACE_OSCALL_RETURN (::close (handle), int, -1); + //FUZZ: enable check_for_lack_ACE_OS #endif /* ACE_WIN32 */ } diff --git a/ACE/ace/OS_NS_unistd.inl b/ACE/ace/OS_NS_unistd.inl index a1b54738888..cca0798ea22 100644 --- a/ACE/ace/OS_NS_unistd.inl +++ b/ACE/ace/OS_NS_unistd.inl @@ -897,7 +897,9 @@ ACE_OS::sleep (u_int seconds) // Initializer doesn't work with Green Hills 1.8.7 rqtp.tv_sec = seconds; rqtp.tv_nsec = 0L; + //FUZZ: disable check_for_lack_ACE_OS ACE_OSCALL_RETURN (::nanosleep (&rqtp, 0), int, -1); + //FUZZ: enable check_for_lack_ACE_OS #else ACE_OSCALL_RETURN (::sleep (seconds), int, -1); #endif /* ACE_WIN32 */ @@ -912,7 +914,9 @@ ACE_OS::sleep (const ACE_Time_Value &tv) return 0; #elif defined (ACE_HAS_CLOCK_GETTIME) timespec_t rqtp = tv; + //FUZZ: disable check_for_lack_ACE_OS ACE_OSCALL_RETURN (::nanosleep (&rqtp, 0), int, -1); + //FUZZ: enable check_for_lack_ACE_OS #else # if defined (ACE_HAS_NONCONST_SELECT_TIMEVAL) // Copy the timeval, because this platform doesn't declare the timeval @@ -921,11 +925,15 @@ ACE_OS::sleep (const ACE_Time_Value &tv) # if defined(ACE_TANDEM_T1248_PTHREADS) ACE_OSCALL_RETURN (::spt_select (0, 0, 0, 0, &tv_copy), int, -1); # else + //FUZZ: disable check_for_lack_ACE_OS ACE_OSCALL_RETURN (::select (0, 0, 0, 0, &tv_copy), int, -1); + //FUZZ: enable check_for_lack_ACE_OS # endif # else /* ! ACE_HAS_NONCONST_SELECT_TIMEVAL */ const timeval *tvp = tv; + //FUZZ: disable check_for_lack_ACE_OS ACE_OSCALL_RETURN (::select (0, 0, 0, 0, tvp), int, -1); + //FUZZ: enable check_for_lack_ACE_OS # endif /* ACE_HAS_NONCONST_SELECT_TIMEVAL */ #endif /* ACE_WIN32 */ } |