• Skip to main content
  • assistive.skiplink.to.breadcrumbs
  • assistive.skiplink.to.header.menu
  • assistive.skiplink.to.action.menu
  • assistive.skiplink.to.quick.search
Log in
Confluence
  • Spaces
  • Hit enter to search
  • Help
    • Online Help
    • Keyboard Shortcuts
    • Feed Builder
    • What’s new
    • Available Gadgets
    • About Confluence
  • Log in

SEI CERT C++ Coding Standard
SEI CERT C++ Coding Standard
  • Pages
  • Boards

Space shortcuts

  • Dashboard
  • Secure Coding Home
  • Android
  • C
  • C++
  • Java
  • Perl

Page tree

Browse pages
    • Attachments (0)
    • Page History
    • Page Information
    • Resolved comments
    • View in Hierarchy
    • View Source
    • Export to PDF
    • Export to Word
  1. Pages
  2. SEI CERT C++ Coding Standard
  3. 2 Rules
  • Jira links

Rule 10. Concurrency (CON)

  • Created by David Keaton, last modified by David Svoboda on Mar 15, 2022

  • Page:
    CON50-CPP. Do not destroy a mutex while it is locked
  • Page:
    CON51-CPP. Ensure actively held locks are released on exceptional conditions
  • Page:
    CON52-CPP. Prevent data races when accessing bit-fields from multiple threads
  • Page:
    CON53-CPP. Avoid deadlock by locking in a predefined order
  • Page:
    CON54-CPP. Wrap functions that can spuriously wake up in a loop
  • Page:
    CON55-CPP. Preserve thread safety and liveness when using condition variables
  • Page:
    CON56-CPP. Do not speculatively lock a non-recursive mutex that is already owned by the calling thread

 

The following rules from the SEI CERT C Coding Standard also apply in C++:

  • Page:
    CON33-C. Avoid race conditions when using library functions
  • Page:
    CON37-C. Do not call signal() in a multithreaded program
  • Page:
    CON40-C. Do not refer to an atomic variable twice in an expression
  • Page:
    CON41-C. Wrap functions that can fail spuriously in a loop
  • Page:
    CON43-C. Do not allow data races in multithreaded code

Information for Editors
To have a new guideline automatically listed above be sure to label it con and rule.

Risk Assessment Summary

Rule

Severity

Likelihood

Remediation Cost

Priority

Level

CON50-CPPMediumProbableHigh

P4

L3

CON51-CPPLowProbableLow

P6

L2

CON52-CPPMediumProbableMedium

P8

L2

CON53-CPPLowProbableMedium

P4

L3

CON54-CPPLowUnlikelyMedium

P2

L3

CON55-CPPLowUnlikelyMedium

P2

L3

CON56-CPPLowUnlikelyHigh

P1

L3

 

 

  • rule-list
  • con
  • rule
  • section
Overview
Content Tools
  • Powered by Atlassian Confluence 8.5.21
  • Printed by Atlassian Confluence 8.5.21
  • Report a bug
  • Atlassian News
Atlassian

Carnegie Mellon University
Software Engineering Institute
4500 Fifth Avenue
Pittsburgh, PA 15213-2612
412-268-5800

Contact Us
  • Office Locations|
  • Additional Sites Directory|
  • Legal|
  • Privacy Notice|
  • CMU Ethics Hotline|
  • www.sei.cmu.edu

©2023 Carnegie Mellon University

{"serverDuration": 78, "requestCorrelationId": "5a67d396d8dd1b9b"}