发明名称 DATA COLLISIONS IN CONCURRENT PROGRAMS
摘要 Described are techniques for detecting data collisions between a first portion and a second portion of an application executing on a computer, the first portion and the second portions executing concurrently with respect to each other. While the first portion and second portion are executing, before the first portion accesses a memory location shared by the first portion and the second portion, a value stored in the memory location is captured and the first portion is delayed. While the second portion continues to execute the first portion is delayed. After a period of the first portion having been paused or slowed, the current content of the memory location is compared with the captured content to determine if there is a data collision. The first and second portions may be threads, and the capturing, delaying, and determining may be performed by code inserted to the application after it has been compiled.
申请公布号 US2015261654(A1) 申请公布日期 2015.09.17
申请号 US201514726316 申请日期 2015.05.29
申请人 Microsoft Technology Licensing, LLC 发明人 Erickson John;Musuvathi Madan
分类号 G06F11/36 主分类号 G06F11/36
代理机构 代理人
主权项 1. A method of testing for potential data collisions between a first thread and a second thread of an application executing on a computer, the first thread and the second thread configured to execute concurrently with respect to each other, the method comprising: automatically identifying a variable as a test target by determining that the variable is accessed by the first thread and by determining that the same variable is also accessed by the second thread; based on the variable having been identified as a test target, automatically inserting delaying code and comparing code into the application, the delaying and comparing code inserted within application code of the first thread and at an access operation within application code of the first thread that accesses the variable, the delaying and comparing code located according to the location of the access operation within the application code of the first thread; while the first thread and second thread are executing, before the access operation accesses the identified variable shared by the first thread and the second thread, capturing, by the comparing code, a value stored in the variable, and delaying, by the delaying code, the first thread, wherein the second thread continues to execute while the first thread is delayed; and after a period of the first thread having been paused or slowed, comparing, by the comparing code, a current content of the variable with the captured content, and taking a debugging action in response to a determination that the current content and the captured content differ.
地址 Redmond WA US