...
On a Linux machine running gcc 4.3.2, this program produces the following output:
| Code Block |
|---|
do_stuff main |
which does not indicate the order in which data was logged.
...
On a Linux machine running gcc GCC 4.3.2, this program produces the following output:
| Code Block |
|---|
main do_stuff |
which matches the order in which logging occurred.
...
Search for vulnerabilities resulting from the violation of this rule on the CERT website.
Other Languages
Related Guidelines
CERT This rule appears in the C++ Secure Coding Standard as : FIO31-CPP. Do not simultaneously open the same file multiple times.
Bibliography
unmigrated-wiki-markup
\[[ISO/IEC 9899:1999|AA. Bibliography#ISO/IEC 9899-1999]\] Section 7.19.3, "Files" \[[MITRE 07|AA. Bibliography#MITRE 07]\] [CWE ID 362|http://cwe.mitre.org/data/definitions/362.html], "Race Condition," [CWE ID 675|http://cwe.mitre.org/data/definitions/675.html], and "Duplicate Operations on Resource"
MITRE CWE: CWE-362, "Race Condition,"
MITRE CWE: CWE-675, and "Duplicate Operations on Resource"
Bibliography
...