An apparatus, method and computer-readable medium provide for detecting and filtering potential race conditions. In one example, potential race conditions may be detected by determining overlap of memory accesses (e.g., read, write). Potential race conditions may be filtered as potentially benign or
An apparatus, method and computer-readable medium provide for detecting and filtering potential race conditions. In one example, potential race conditions may be detected by determining overlap of memory accesses (e.g., read, write). Potential race conditions may be filtered as potentially benign or harmful race conditions using, for example, heuristics, comparison of output states from execution of instructions or operations in differing sequences or identifying of associated output bugs corresponding to the execution of operations in different sequences.
대표청구항▼
The invention claimed is: 1. One or more computer-readable media containing executable code for performing the following steps: recording execution of a first execution context comprising a first write instruction and a second execution context comprising a second write instruction; detecting one o
The invention claimed is: 1. One or more computer-readable media containing executable code for performing the following steps: recording execution of a first execution context comprising a first write instruction and a second execution context comprising a second write instruction; detecting one or more possible race conditions that may occur when concurrently executing the first execution context and the second execution context; filtering one or more false positive race conditions from the one or more possible race conditions to obtain a positive race condition; determining that the first write instruction writes a first value to a memory location during the positive race condition, and that the second write instruction writes a second value to the memory location during the positive race condition; comparing the first value to the second value; categorizing the positive race condition as a potentially harmful race condition when the first value is different from the second value; and categorizing the positive race condition as a potentially benign race condition when the first value is equal to the second value. 2. The one or more computer-readable media of claim 1, wherein the first execution context comprises a first instruction thread and the second execution context comprises a second instruction thread. 3. The one or more computer-readable media of claim 2, wherein detecting the one or more possible race conditions comprises: determining an execution time overlap between at least a first plurality of instructions associated with the first instruction thread and a second plurality of instructions associated with the second instruction thread; and identifying the one or more possible race conditions based on the determination of the execution time overlap. 4. The one or more computer-readable media of claim 3, wherein determining the execution time overlap includes: recording a start time and an end time for at least the first instruction thread and the second instruction thread; identifying an overlap between the start time and the end time of at least the first instruction thread and the start time and the end time of the second instruction thread; and identifying the execution time overlap between at least the first instruction thread and the second instruction thread based on the identified overlap. 5. The one or more computer-readable media of claim 1, further comprising executable code for: assigning a first priority value to the positive race condition when the positive race condition is categorized as a potentially harmful race condition; and assigning a second priority value to the positive race condition when the positive race condition is categorized as a potentially benign race condition. 6. The one or more computer-readable media of claim 5, further comprising executable code for: generating a race condition report based on the filtering, wherein the race condition report includes the positive race condition and the one or more false positive race conditions. 7. The one or more computer-readable media according to claim 1, wherein the first execution context and the second execution context each include a plurality of instructions that are executed sequentially in a multi-tasking environment. 8. The one or more computer-readable media according to claim 1, wherein the first execution context and the second execution context run simultaneously in a multiprocessing environment. 9. One or more computer-readable media containing executable code for performing the following steps: detecting a plurality of race conditions that may occur when concurrently executing a first instruction thread and a second instruction thread, the first instruction thread comprising a write instruction that writes a value to a memory location; filtering the plurality of race conditions, wherein filtering the plurality of race conditions comprises, for a first one of the race conditions: determining a value stored at the memory location prior to executing the write instruction of the first instruction thread; executing at least a portion of the first instruction thread, including the write instruction; comparing the value stored at the memory location prior to executing the write instruction to the value written by the write instruction of the first instruction thread; and determining that the first race condition is a benign race condition when the value written by the write instruction of the first instruction thread is equal to the value stored at the memory location prior to executing the write instruction. 10. The one or more computer-readable media of claim 9, further including executable code for: generating a race condition report based on the filtering. 11. The one or more computer-readable media of claim 10, wherein the filtering is performed by recording execution of the first instruction thread and the second instruction thread in a replay log. 12. The one or more computer-readable media of claim 9, further including executable code for: identifying an output bug associated with executing the first instruction thread; and identifying at least one of the plurality of race conditions as a harmful race condition based on identifying the output bug. 13. The one or more computer-readable media of claim 12, wherein at least one of executing the first instruction thread or executing the second instruction thread is not associated with the output bug. 14. One or more computer-readable media comprising executable code for performing the following steps: recording an execution of a first execution context and a second execution context, the first execution context comprising a write operation that writes to a memory at a memory address, and the second execution context comprising a read operation that reads from the memory via the same memory address that is written to by the write operation; detecting a race condition that may occur when concurrently executing the first execution context and the second execution context; identifying one or more bits at the memory address that are modified by the write operation; identifying one or more bits at the memory address that are read by the read operation; determining whether the bits read from the memory address by the read operation overlap with the bits written to the memory address by the write operation; and when the bits read by the read operation do not overlap with the bits written by the write operation, categorizing the race condition as a benign race condition. 15. The one or more computer-readable media of claim 14, the steps further comprising generating a race report identifying the race condition as a benign race condition. 16. The one or more computer-readable media of claim 14, wherein determining whether the bits read by the read operation overlap with the bits written by the write operation comprises: determining at least a first effective bit mask for the write operation and a second effective bit mask for the read operation, wherein, when the first effective bit mask and the second effective bit mask intersect, the bits read by the read operation are determined to overlap with the bits written by the write operation. 17. The one or more computer-readable media of claim 16, the steps further comprising: when the first effective bit mask and the second effective bit mask intersect, categorizing the race condition as a potentially harmful race condition.
연구과제 타임라인
LOADING...
LOADING...
LOADING...
LOADING...
LOADING...
이 특허에 인용된 특허 (11)
Hue,Vincent, Automated tool for detection of potential race condition.
※ AI-Helper는 부적절한 답변을 할 수 있습니다.