Bug 3984 - use after free
Summary: use after free
Status: NEW
Alias: None
Product: DAnCE
Classification: Unclassified
Component: LocalityManager (show other bugs)
Version: 1.0.3
Hardware: All Linux
: P3 normal
Assignee: DOC Center Support List (internal)
URL:
Depends on:
Blocks:
 
Reported: 2011-08-02 13:31 CDT by Johnny Willemsen
Modified: 2011-12-14 08:34 CST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Johnny Willemsen 2011-08-02 13:31:33 CDT
Coverity reports this error in the CPU_Affinity plugin

82   	          }
83   	      }
84   	
Event freed_arg: "ACE_OS::free(void *)" frees "affinity". [details]
85   	    ACE_OS::free (affinity);
86   	
87   	    pid_t const pid = ACE_OS::getpid ();
88   	
89   	    int retval = ::sched_setaffinity (pid,
90   	                                      sizeof (cpu_set_t),
91   	                                      &mask);
92   	
At conditional (1): "retval != 0" taking true path
93   	    if (retval != 0)
94   	      {
95   	        std::stringstream str;
96   	        ACE_Auto_Basic_Array_Ptr<char> safe_error (ACE_OS::strerror (ACE_OS::last_error ()));
97   	
Event deref_arg: Calling "std::basic_ostream<char, std::char_traits<char> > &std::operator << <std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> > &, char const *)" dereferences freed pointer "affinity".
98   	        str << "Unable to set CPU affinity to <" << affinity << ">: "
99   	            << safe_error.get ();
100  	        std::string message = str.str ();
101