Automated tool for detection of potential race condition
First Claim
1. A method for detecting a potential race condition comprising the steps of:
- identifying a memory access in a source code segment, the source code segment being executable in any one of a plurality of execution threads;
searching backward from the memory access through each of the plurality of threads for an assert protection declaration without any intervening deassert protection declaration, and identifying the potential race condition if the assert protection declaration without any intervening deassert protection declaration was not found in each of the plurality of threads; and
searching forward from the memory access through each of the plurality of threads for the deassert protection declaration, and identifying the potential race condition if the deassert protection declaration was not found in each of the plurality of threads.
3 Assignments
0 Petitions
Accused Products
Abstract
A method for detecting a potential race condition is provided comprising the steps of identifying a memory access in a source code segment, the source code segment being executable in any one of a plurality of execution threads; searching backward from the memory access through each of the plurality of threads for an assert protection declaration without any intervening deassert protection declaration, and identifying the potential race condition if the assert protection declaration without any intervening deassert protection declaration was not found in each of the plurality of threads; and searching forward from the memory access through each of the plurality of threads for the deassert protection declaration, and identifying the potential race condition if the deassert protection declaration was not found in each of the plurality of threads.
32 Citations
73 Claims
-
1. A method for detecting a potential race condition comprising the steps of:
-
identifying a memory access in a source code segment, the source code segment being executable in any one of a plurality of execution threads;
searching backward from the memory access through each of the plurality of threads for an assert protection declaration without any intervening deassert protection declaration, and identifying the potential race condition if the assert protection declaration without any intervening deassert protection declaration was not found in each of the plurality of threads; and
searching forward from the memory access through each of the plurality of threads for the deassert protection declaration, and identifying the potential race condition if the deassert protection declaration was not found in each of the plurality of threads. - View Dependent Claims (2, 3, 4, 5, 6, 23, 24, 25, 26, 31, 35, 38, 39, 40)
-
-
7. A method for detecting a potential race condition comprising the steps of:
-
selecting one or more source code segments, the source code segments being executable in any one of a plurality of execution threads;
selecting a memory access to identify from the selected source code segments;
identifying the memory access in one or more of the selected source code segments;
searching backward from each memory access through each of the plurality of threads for an assert protection declaration without any intervening deassert protection declaration, and identifying the potential race condition if the assert protection declaration without any intervening deassert protection declaration was not found in each of the plurality of threads; and
searching forward from each memory access through each of the plurality of threads for the deassert protection declaration, and identifying the potential race condition if the deassert protection declaration was not found in each of the plurality of threads. - View Dependent Claims (8, 9, 10, 11, 12, 27, 28, 29, 30, 32, 44, 45, 46)
-
-
13. A method for detecting a potential race condition comprising the steps of:
-
(a) identifying a memory access in a first source code segment of a plurality of source code segments, the first code segment being a node interconnecting a first tree and a second tree, and each source code segment, except the first source code segment, arranged either in the first tree as an ancestor of the first code segment or in the second tree as a descendant of the first code segment;
(b) selecting the first source code segment;
(c)(1) searching upward through the selected source code segment of the first tree for an assert protection declaration without any intervening deassert protection declaration, and identifying the potential race condition if;
i) an assert protection declaration without any intervening deassert protection declaration was not found in the selected source code segment of the first tree and ii) the selected source code segment has no parents;
(c)(2) if the selected source code segment has parents, selecting each parent source code segment of the selected source code segment, and repeating step (c) for each of the selected parent source code segments;
(d) selecting the first source code segment; and
(e)(1) searching downward through the selected source code segment of the second tree for the deassert protection declaration, and identifying the potential race condition if;
i) the deassert protection declaration was not found in the selected source code segment of the second tree, and ii) the selected source code segment has no children,(e)(2) if the selected source code segment has children, selecting each child source code segment of the selected source code segment, and repeating steps (e) for each of the selected parent source code segments. - View Dependent Claims (14, 15, 16, 17, 18, 19, 20, 21, 22, 33, 34, 36, 37, 41, 42, 43, 68)
-
-
47. A computer readable medium, having stored thereon, computer executable process steps operative to control a computer to detect possible race conditions, the process steps comprising:
-
identifying a memory access in a source code segment, the source code segment being executable in any one of a plurality of execution threads;
searching backward from the memory access through each of the plurality of threads for an assert protection declaration without any intervening deassert protection declaration, and identifying the potential race condition if the assert protection declaration without any intervening deassert protection declaration was not found in each of the plurality of threads; and
searching forward from the memory access through each of the plurality of threads for the deassert protection declaration, and identifying the potential race condition if the deassert protection declaration was not found in each of the plurality of threads.
-
-
48. A computer readable medium, having stored thereon, computer executable process steps operative to control a computer to detect possible race conditions, the process steps comprising:
-
selecting one or more source code segments, the source code segments being executable in any one of a plurality of execution threads;
selecting a memory access to identify from the selected source code segments;
identifying the memory access in one or more of the selected source code segments;
searching backward from each memory access through each of the plurality of threads for an assert protection declaration without any intervening deassert protection declaration, and identifying the potential race condition if an assert protection declaration without any intervening deassert protection declaration was not found in each of the plurality of threads; and
searching forward from each memory access through each of the plurality of threads for the deassert protection declaration, and identifying the potential race condition if the deassert protection declaration was not found in each of the plurality of threads.
-
-
49. A computer readable medium, having stored thereon, computer executable process steps operative to control a computer to detect possible race conditions, the process steps comprising:
-
(a) identifying a memory access in a first source code segment of a plurality of source code segments, the first code segment being a node interconnecting a first tree and a second tree, and each source code segment, except the first source code segment, arranged either in the first tree as an ancestor of the first code segment or in the second tree as a descendant of the first code segment;
(b) selecting the first source code segment;
(c) searching upward through the selected source code segment of the first tree for an assert protection declaration without any intervening deassert protection declaration, and identifying the potential race condition if;
i) an assert protection declaration without any intervening deassert protection declaration was not found in the selected source code segment of the first tree and ii) the selected source code segment has no parents;
(c)(1) if the selected source code segment has parents, selecting each parent source code segment of the selected source code segment, and (c)(1)(A) repeating step c for each of the selected parent source code segments;
(d) selecting the first source code segment; and
(e) searching downward through the selected source code segment of the second tree for the deassert protection declaration, and identifying the potential race condition if;
i) the deassert protection declaration was not found in the selected source code segment of the second tree, and ii) the selected source code segment has no children,(e)(1) if the selected source code segment has children, selecting each child source code segment of the selected source code segment, and (e)(1)(A) repeating steps e for each of the selected parent source code segments.
-
-
50. A system comprising:
-
a processing device coupled to a memory, the processing device operable to;
identify a memory access in a source code segment, the source code segment being executable in any one of a plurality of execution threads;
search backward from the memory access through each of the plurality of threads for an assert protection declaration without any intervening deassert protection declaration, and identify the potential race condition if the assert protection declaration without any intervening deassert protection declaration was not found in each of the plurality of threads; and
search forward from the memory access through each of the plurality of threads for the deassert protection declaration, and identify the potential race condition if the deassert protection declaration was not found in each of the plurality of threads. - View Dependent Claims (53, 56, 59, 66, 67)
-
-
51. A system comprising:
a processing device coupled to a memory, the processing device operative to;
select one or more source code segments, the source code segments being executable in any one of a plurality of execution threads;
select a memory access to identify from the selected source code segments;
identify the memory access in one or more of the selected source code segments;
search backward from each memory access through each of the plurality of threads for an assert protection declaration without any intervening deassert protection declaration, and identify the potential race condition if an assert protection declaration without any intervening deassert protection declaration was not found in each of the plurality of threads; and
search forward from each memory access through each of the plurality of threads for the deassert protection declaration, and identify the potential race condition if the deassert protection declaration was not found in each of the plurality of threads. - View Dependent Claims (54, 57, 60, 62, 63)
-
52. A system comprising:
a processing device coupled to a memory, the processing device operative to;
(a) identify a memory access in a first source code segment of a plurality of source code segments, the first code segment being a node interconnecting a first tree and a second tree, and each source code segment, except the first source code segment, arranged either in the first tree as an ancestor of the first code segment or in the second tree as a descendant of the first code segment;
(b) select the first source code segment;
(c) search upward through the selected source code segment of the first tree for an assert protection declaration without any intervening deassert protection declaration, and identify the potential race condition if;
i) an assert protection declaration without any intervening deassert protection declaration was not found in the selected source code segment of the first tree and ii) the selected source code segment has no parents;
(c)(1) if the selected source code segment has parents, select each parent source code segment of the selected source code segment, and (c)(1)(A) repeat step c for each of the selected parent source code segments;
(d) select the first source code segment; and
(e) search downward through the selected source code segment of the second tree for the deassert protection declaration, and identify the potential race condition if;
i) the deassert protection declaration was not found in the selected source code segment of the second tree, and ii) the selected source code segment has no children,(e)(1) if the selected source code segment has children, select each child source code segment of the selected source code segment, and (e)(1)(A) repeat steps e for each of the selected parent source code segments. - View Dependent Claims (55, 58, 61, 64, 65)
-
69. A system comprising:
-
a race condition detection module configured to detect a memory access for a variable in a source file;
an assertion determination module configured to receive from the race condition detection module the source file and configured to identify whether assertion of protection has been provided in all the threads of execution that use the memory access; and
a deassertion determination module configured to receive from the race condition determination module the source file and configured to identify whether deassertion of protection has been provided in all threads of execution that use the memory access. - View Dependent Claims (70, 71, 72, 73)
-
Specification