Liviu Nicoara wrote:
Liviu Nicoara wrote:
On May 21, 2007, at 7:17 PM, Martin Sebor wrote:

Liviu Nicoara wrote:
I agree it would be a spectacular demonstration of the usefulness of the tool but -- based on my knowledge of the stdcxx code -- I strongly doubt I can demonstrate an MT bug in it. Do you know of an unresolved MT bug in stdcxx?

There is a problem in locale (as usual, sigh :( A couple of our
thread safety tests have been crashing: 22_mt and 22_time_put_mt.

I see they are not ported to the new infrastructure yet. Are they failing in dev or latest release? One [looong] run of 22_mt yielded no failures.

FWIW, the run of the 4.1.4-rel branch of locale/mt.cpp (in a 15s build on Linux Slackware 10.2 on x86, with Intel 9.1.042) has yielded the analysis in the attached file. I have chosen the text format and a width of 140 columns for readability. Please notice that the run has not failed any [test] assertions.

I am not sure what to make about the errors flagged by the ITC tool because I am not sufficiently familiar with the locale code. A quick glance over the places in the analysis report shows unguarded rw accesses to certain memory locations (used to store facets?). I am not sure though whether this access is intentionally unguarded or not.

Martin, could you please take a look at it and give us your opinion?

Thanks,
Liviu


Intel(R) Thread Checker 3.1 command line instrumentation driver (24273)
Copyright (c) 2007 Intel Corporation. All rights reserved.
____________________________________________________________________________________________________________________________________________
|ID|Short        |Severi|Co|Context[Bes|Description                             
                                  |1st Access[|2nd         |
|  |Description  |ty    |un|t]         |                                        
                                  |Best]      |Access[Best]|
|  |             |Name  |t |           |                                        
                                  |           |            |
____________________________________________________________________________________________________________________________________________
|1 |Read -> Write|Error |6 |"mt.cpp":52|Memory write of *alignment at 
"mt.cpp":537 conflicts with a prior memory  |"mt.cpp":53|"mt.cpp":537|
|  |data-race    |      |  |7          |read of *alignment at "mt.cpp":531 
(anti dependence)                      |1          |            |
____________________________________________________________________________________________________________________________________________
|2 |Write -> Read|Error |20|"mt.cpp":52|Memory read of *alignment at 
"mt.cpp":531 conflicts with a prior memory   |"mt.cpp":53|"mt.cpp":531|
|  |data-race    |      |  |7          |write of *alignment at "mt.cpp":537 
(flow dependence)                     |7          |            |
____________________________________________________________________________________________________________________________________________
|3 |Write -> Read|Error |25|"_locale.h"|Memory read of __pfacets->__facets[] at 
"_locale.h":363 conflicts with a  |"locale_cor|"_locale.h":|
|  |data-race    |      |9 |:352       |prior memory write of 
this->P32.__N4__rw11__rw_localeE_R->_C_std_facets[] |e.cpp":190 |363         |
|  |             |      |  |           |at "locale_core.cpp":190 (flow 
dependence)                                |           |            |
____________________________________________________________________________________________________________________________________________
|4 |Read -> Write|Error |72|"locale_cor|Memory write of 
this->P32.__N4__rw11__rw_localeE_R->_C_std_facets[] at    
|"_locale.h"|"locale_core|
|  |data-race    |      |  |e.cpp":85  |"locale_core.cpp":190 conflicts with a 
prior memory read of               |:363       |.cpp":190   |
|  |             |      |  |           |__pfacets->__facets[] at 
"_locale.h":363 (anti dependence)                |           |            |
____________________________________________________________________________________________________________________________________________
|5 |Write ->     |Error |71|"locale_cor|Memory write of 
this->P32.__N4__rw11__rw_localeE_R->_C_std_facets[] at    
|"locale_cor|"locale_core|
|  |Write        |      |  |e.cpp":85  |"locale_core.cpp":190 conflicts with a 
prior memory write of              |e.cpp":190 |.cpp":190   |
|  |data-race    |      |  |           
|this->P32.__N4__rw11__rw_localeE_R->_C_std_facets[] at                    |    
       |            |
|  |             |      |  |           |"locale_core.cpp":190 (output 
dependence)                                 |           |            |
____________________________________________________________________________________________________________________________________________
|6 |Write -> Read|Error |14|"locale_bod|Memory read of this->_C_std_facets[] at 
"locale_body.cpp":1069 conflicts  |"locale_cor|"locale_body|
|  |data-race    |      |40|y.cpp":1016|with a prior memory write of            
                                  |e.cpp":190 |.cpp":1069  |
|  |             |      |  |           
|this->P32.__N4__rw11__rw_localeE_R->_C_std_facets[] at                    |    
       |            |
|  |             |      |  |           |"locale_core.cpp":190 (flow dependence) 
                                  |           |            |
____________________________________________________________________________________________________________________________________________
|7 |Write -> Read|Error |14|"locale_bod|Memory read of this->_C_std_facets[] at 
"locale_body.cpp":1073 conflicts  |"locale_cor|"locale_body|
|  |data-race    |      |40|y.cpp":1016|with a prior memory write of            
                                  |e.cpp":190 |.cpp":1073  |
|  |             |      |  |           
|this->P32.__N4__rw11__rw_localeE_R->_C_std_facets[] at                    |    
       |            |
|  |             |      |  |           |"locale_core.cpp":190 (flow dependence) 
                                  |           |            |
____________________________________________________________________________________________________________________________________________
|8 |Write -> Read|Error |14|"locale_bod|Memory read of this->_C_std_facets[] at 
"locale_body.cpp":1120 conflicts  |"locale_cor|"locale_body|
|  |data-race    |      |40|y.cpp":1016|with a prior memory write of            
                                  |e.cpp":190 |.cpp":1120  |
|  |             |      |  |           
|this->P32.__N4__rw11__rw_localeE_R->_C_std_facets[] at                    |    
       |            |
|  |             |      |  |           |"locale_core.cpp":190 (flow dependence) 
                                  |           |            |
____________________________________________________________________________________________________________________________________________
|9 |Write -> Read|Error |10|"locale_bod|Memory read of global at 
"locale_body.cpp":784 conflicts with a prior     |"locale_bod|"locale_body|
|  |data-race    |      |7 |y.cpp":769 |memory write of global at 
"locale_body.cpp":811 (flow dependence)         |y.cpp":811 |.cpp":784   |
____________________________________________________________________________________________________________________________________________
|10|Write -> Read|Error |7 |"locale_com|Memory read of fid->_C_id at 
"locale_combine.cpp":690 conflicts with a    |"facet.cpp"|"locale_comb|
|  |data-race    |      |  |bine.cpp":6|prior memory write of this->_C_id at 
"facet.cpp":712 (flow dependence)    |:712       |ine.cpp":690|
|  |             |      |  |88         |                                        
                                  |           |            |
____________________________________________________________________________________________________________________________________________
|11|Write -> Read|Error |7 |"locale_com|Memory read of fid->_C_id at 
"locale_combine.cpp":694 conflicts with a    |"facet.cpp"|"locale_comb|
|  |data-race    |      |  |bine.cpp":6|prior memory write of this->_C_id at 
"facet.cpp":712 (flow dependence)    |:712       |ine.cpp":694|
|  |             |      |  |88         |                                        
                                  |           |            |
____________________________________________________________________________________________________________________________________________
|12|Write -> Read|Error |7 |"locale_com|Memory read of fid->_C_id at 
"locale_combine.cpp":699 conflicts with a    |"facet.cpp"|"locale_comb|
|  |data-race    |      |  |bine.cpp":6|prior memory write of this->_C_id at 
"facet.cpp":712 (flow dependence)    |:712       |ine.cpp":699|
|  |             |      |  |88         |                                        
                                  |           |            |
____________________________________________________________________________________________________________________________________________
|13|Write -> Read|Error |7 |"locale_com|Memory read of 
*pfacet->P32.I32_2be_type.0 at "locale_combine.cpp":284    
|"facet.cpp"|"locale_comb|
|  |data-race    |      |  |bine.cpp":2|conflicts with a prior memory write of 
this->_C_id at "facet.cpp":712     |:712       |ine.cpp":284|
|  |             |      |  |75         |(flow dependence)                       
                                  |           |            |
____________________________________________________________________________________________________________________________________________
|14|Write -> Read|Error |7 |"locale_com|Memory read of 
*pfacet->P32.I32_2be_type.0 at "locale_combine.cpp":295    
|"facet.cpp"|"locale_comb|
|  |data-race    |      |  |bine.cpp":2|conflicts with a prior memory write of 
this->_C_id at "facet.cpp":712     |:712       |ine.cpp":295|
|  |             |      |  |75         |(flow dependence)                       
                                  |           |            |
____________________________________________________________________________________________________________________________________________
|15|Write -> Read|Error |7 |"locale_com|Memory read of 
*pfacet->P32.I32_2be_type.0 at "locale_combine.cpp":123    
|"facet.cpp"|"locale_comb|
|  |data-race    |      |  |bine.cpp":9|conflicts with a prior memory write of 
this->_C_id at "facet.cpp":712     |:712       |ine.cpp":123|
|  |             |      |  |8          |(flow dependence)                       
                                  |           |            |
____________________________________________________________________________________________________________________________________________
|16|Thread       |Inform|1 |Whole      |Thread termination at 
"threadclass.h":141 - includes stack allocation of  |"threadclas|"threadclass|
|  |termination  |ation |  |Program 1  |1.996 MB and use of 5.668 KB            
                                  |s.h":141   |.h":141     |
____________________________________________________________________________________________________________________________________________
|17|Thread       |Inform|1 |Whole      |Thread termination at 
"threadclass.h":141 - includes stack allocation of  |"threadclas|"threadclass|
|  |termination  |ation |  |Program 2  |1.996 MB and use of 5.668 KB            
                                  |s.h":141   |.h":141     |
____________________________________________________________________________________________________________________________________________
|18|Thread       |Inform|1 |Whole      |Thread termination at 
"threadclass.h":141 - includes stack allocation of  |"threadclas|"threadclass|
|  |termination  |ation |  |Program 3  |1.996 MB and use of 5.668 KB            
                                  |s.h":141   |.h":141     |
____________________________________________________________________________________________________________________________________________
|19|Thread       |Inform|1 |Whole      |Thread termination at 
"threadclass.h":141 - includes stack allocation of  |"threadclas|"threadclass|
|  |termination  |ation |  |Program 4  |1.996 MB and use of 5.668 KB            
                                  |s.h":141   |.h":141     |
____________________________________________________________________________________________________________________________________________
|20|Thread       |Inform|1 |Whole      |Thread termination at 
"threadclass.h":141 - includes stack allocation of  |"threadclas|"threadclass|
|  |termination  |ation |  |Program 5  |1.996 MB and use of 5.668 KB            
                                  |s.h":141   |.h":141     |
____________________________________________________________________________________________________________________________________________
|21|Thread       |Inform|1 |Whole      |Thread termination at 
"threadclass.h":141 - includes stack allocation of  |"threadclas|"threadclass|
|  |termination  |ation |  |Program 6  |1.996 MB and use of 5.668 KB            
                                  |s.h":141   |.h":141     |
____________________________________________________________________________________________________________________________________________
|22|Thread       |Inform|1 |Whole      |Thread termination at 
"threadclass.h":141 - includes stack allocation of  |"threadclas|"threadclass|
|  |termination  |ation |  |Program 7  |1.996 MB and use of 5.719 KB            
                                  |s.h":141   |.h":141     |
____________________________________________________________________________________________________________________________________________
|23|Thread       |Inform|1 |Whole      |Thread termination at 
"threadclass.h":141 - includes stack allocation of  |"threadclas|"threadclass|
|  |termination  |ation |  |Program 8  |1.996 MB and use of 5.668 KB            
                                  |s.h":141   |.h":141     |
____________________________________________________________________________________________________________________________________________
|24|Thread       |Inform|1 |Whole      |Thread termination at "mt.cpp":688 - 
includes stack allocation of 84 KB   |"mt.cpp":68|"mt.cpp":688|
|  |termination  |ation |  |Program 9  |and use of 14.316 KB                    
                                  |8          |            |
____________________________________________________________________________________________________________________________________________

Reply via email to