[{"data":1,"prerenderedAt":5302},["ShallowReactive",2],{"global-navigation":3,"page-\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fconcurrency-con\u002Fcon09-c":28,"surround-\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fconcurrency-con\u002Fcon09-c":3492,"sidebar-sei-cert-c-coding-standard":3500},[4,8],{"title":5,"path":6,"_path":6,"fromAppConfig":7},"Home","\u002F",true,{"title":9,"path":10,"children":11,"_path":27,"fromAppConfig":7},"Coding Standards","\u002Fcoding-standards\u002F",[12,15,18,21,24],{"title":13,"path":14},"Android Coding Standard","\u002Fandroid-secure-coding-standard\u002F",{"title":16,"path":17},"C Coding Standard","\u002Fsei-cert-c-coding-standard\u002F",{"title":19,"path":20},"C++ Coding Standard","\u002Fsei-cert-cpp-coding-standard\u002F",{"title":22,"path":23},"Java Coding Standard","\u002Fsei-cert-oracle-coding-standard-for-java\u002F",{"title":25,"path":26},"Perl Coding Standard","\u002Fsei-cert-perl-coding-standard\u002F","\u002Fcoding-standards",{"id":29,"title":30,"body":31,"description":41,"extension":3481,"meta":3482,"navigation":7,"path":3488,"seo":3489,"stem":3490,"__hash__":3491},"content\u002F4.sei-cert-c-coding-standard\u002F08.recommendations\u002F05.concurrency-con\u002F10.con09-c.md","CON09-C. Avoid the ABA problem when using lock-free algorithms",{"type":32,"value":33,"toc":3469},"minimark",[34,38,42,45,58,66,69,77,85,90,93,340,350,370,374,377,562,566,577,1277,1288,1296,1299,1581,1599,1603,1612,1619,1626,2078,2098,2106,2111,2660,2664,2671,3275,3279,3287,3348,3352,3355,3358,3361,3364,3369,3383,3387,3440,3443,3465],[35,36,30],"h1",{"id":37},"con09-c-avoid-the-aba-problem-when-using-lock-free-algorithms",[39,40,41],"p",{},"Lock-free programming is a technique that allows concurrent updates of shared data structures without using explicit locks. This method ensures that no threads block for arbitrarily long times, and it thereby boosts performance.",[39,43,44],{},"Lock-free programming has the following advantages:",[46,47,48,52,55],"ul",{},[49,50,51],"li",{},"Can be used in places where locks must be avoided, such as interrupt handlers",[49,53,54],{},"Efficiency benefits compared to lock-based algorithms for some workloads, including potential scalability benefits on multiprocessor machines",[49,56,57],{},"Avoidance of priority inversion in real-time systems",[39,59,60,61,65],{},"Lock-free programming requires the use of special atomic processor instructions, such as CAS (compare and swap), LL\u002FSC (load linked\u002Fstore conditional), or the C Standard ",[62,63,64],"code",{},"atomic_compare_exchange"," generic functions.",[39,67,68],{},"Applications for lock-free programming include",[46,70,71,74],{},[49,72,73],{},"Read-copy-update€? (RCU) in Linux 2.5 kernel",[49,75,76],{},"Lock-free programming on AMD multicore systems",[39,78,79,80,84],{},"The ",[81,82,83],"em",{},"ABA problem"," occurs during synchronization: a memory location is read twice and has the same value for both reads. However, another thread has modified the value, performed other work, then modified the value back between the two reads, thereby tricking the first thread into thinking that the value never changed.",[86,87,89],"h2",{"id":88},"noncompliant-code-example","Noncompliant Code Example",[39,91,92],{},"This noncompliant code example attempts to zero the maximum element of an array. The example is assumed to run in a multithreaded environment, where all variables are accessed by other threads.",[94,95,97],"code-block",{"quality":96},"bad",[98,99,104],"pre",{"className":100,"code":101,"language":102,"meta":103,"style":103},"language-c shiki shiki-themes github-light github-dark monokai","#include \u003Cstdatomic.h>\n \n\u002F*\n * Sets index to point to index of maximum element in array\n * and value to contain maximum array value.\n *\u002F\nvoid find_max_element(atomic_int array[], size_t *index, int *value);\n\nstatic atomic_int array[];\n\nvoid func(void) {\n  size_t index;\n  int value;\n  find_max_element(array, &index, &value);\n  \u002F* ... *\u002F\n  if (!atomic_compare_exchange_strong(array[index], &value, 0)) {\n    \u002F* Handle error *\u002F\n  }\n}\n","c","",[62,105,106,119,126,133,139,145,151,200,206,222,227,242,251,260,280,286,322,328,334],{"__ignoreMap":103},[107,108,111,115],"span",{"class":109,"line":110},"line",1,[107,112,114],{"class":113},"sC2Qs","#include",[107,116,118],{"class":117},"sstjo"," \u003Cstdatomic.h>\n",[107,120,122],{"class":109,"line":121},2,[107,123,125],{"class":124},"sMOD_"," \n",[107,127,129],{"class":109,"line":128},3,[107,130,132],{"class":131},"s8-w5","\u002F*\n",[107,134,136],{"class":109,"line":135},4,[107,137,138],{"class":131}," * Sets index to point to index of maximum element in array\n",[107,140,142],{"class":109,"line":141},5,[107,143,144],{"class":131}," * and value to contain maximum array value.\n",[107,146,148],{"class":109,"line":147},6,[107,149,150],{"class":131}," *\u002F\n",[107,152,154,158,162,165,168,172,175,178,181,184,187,189,192,194,197],{"class":109,"line":153},7,[107,155,157],{"class":156},"sq6CD","void",[107,159,161],{"class":160},"srTi1"," find_max_element",[107,163,164],{"class":124},"(",[107,166,167],{"class":156},"atomic_int",[107,169,171],{"class":170},"sTHNf"," array",[107,173,174],{"class":113},"[]",[107,176,177],{"class":124},", ",[107,179,180],{"class":156},"size_t",[107,182,183],{"class":113}," *",[107,185,186],{"class":170},"index",[107,188,177],{"class":124},[107,190,191],{"class":156},"int",[107,193,183],{"class":113},[107,195,196],{"class":170},"value",[107,198,199],{"class":124},");\n",[107,201,203],{"class":109,"line":202},8,[107,204,205],{"emptyLinePlaceholder":7},"\n",[107,207,209,212,215,217,219],{"class":109,"line":208},9,[107,210,211],{"class":113},"static",[107,213,214],{"class":156}," atomic_int",[107,216,171],{"class":124},[107,218,174],{"class":113},[107,220,221],{"class":124},";\n",[107,223,225],{"class":109,"line":224},10,[107,226,205],{"emptyLinePlaceholder":7},[107,228,230,232,235,237,239],{"class":109,"line":229},11,[107,231,157],{"class":156},[107,233,234],{"class":160}," func",[107,236,164],{"class":124},[107,238,157],{"class":156},[107,240,241],{"class":124},") {\n",[107,243,245,248],{"class":109,"line":244},12,[107,246,247],{"class":156},"  size_t",[107,249,250],{"class":124}," index;\n",[107,252,254,257],{"class":109,"line":253},13,[107,255,256],{"class":156},"  int",[107,258,259],{"class":124}," value;\n",[107,261,263,266,269,272,275,277],{"class":109,"line":262},14,[107,264,265],{"class":160},"  find_max_element",[107,267,268],{"class":124},"(array, ",[107,270,271],{"class":113},"&",[107,273,274],{"class":124},"index, ",[107,276,271],{"class":113},[107,278,279],{"class":124},"value);\n",[107,281,283],{"class":109,"line":282},15,[107,284,285],{"class":131},"  \u002F* ... *\u002F\n",[107,287,289,292,295,298,301,303,307,310,312,315,319],{"class":109,"line":288},16,[107,290,291],{"class":113},"  if",[107,293,294],{"class":124}," (",[107,296,297],{"class":113},"!",[107,299,300],{"class":160},"atomic_compare_exchange_strong",[107,302,164],{"class":124},[107,304,306],{"class":305},"sOrwc","array",[107,308,309],{"class":124},"[index], ",[107,311,271],{"class":113},[107,313,314],{"class":124},"value, ",[107,316,318],{"class":317},"s7F3e","0",[107,320,321],{"class":124},")) {\n",[107,323,325],{"class":109,"line":324},17,[107,326,327],{"class":131},"    \u002F* Handle error *\u002F\n",[107,329,331],{"class":109,"line":330},18,[107,332,333],{"class":124},"  }\n",[107,335,337],{"class":109,"line":336},19,[107,338,339],{"class":124},"}\n",[39,341,342,343,346,347,349],{},"The compare-and-swap operation sets ",[62,344,345],{},"array[index]"," to 0 if and only if it is currently set to ",[62,348,196],{}," . However, this code does not necessarily zero out the maximum value of the array because",[46,351,352,357,365],{},[49,353,354,356],{},[62,355,186],{}," may have changed.",[49,358,359,361,362,364],{},[62,360,196],{}," may have changed (that is, the value of the ",[62,363,196],{}," variable).",[49,366,367,369],{},[62,368,196],{}," may no longer be the maximum value in the array.",[86,371,373],{"id":372},"compliant-solution-mutex","Compliant Solution (Mutex)",[39,375,376],{},"This compliant solution uses a mutex to prevent the data from being modified during the operation. Although this code is thread-safe, it is no longer lock-free.",[94,378,380],{"quality":379},"good",[98,381,383],{"className":100,"code":382,"language":102,"meta":103,"style":103},"#include \u003Cstdatomic.h>\n#include \u003Cthreads.h>\n \nstatic atomic_int array[];\nstatic mtx_t array_mutex;\n\nvoid func(void) {\n  size_t index;\n  int value;\n  if (thrd_success != mtx_lock(&array_mutex)) {\n    \u002F* Handle error *\u002F\n  }\n  find_max_element(array, &index, &value);\n  \u002F* ... *\u002F\n  if (!atomic_compare_exchange_strong(array[index], &value, 0)) {\n    \u002F* Handle error *\u002F\n  }\n  if (thrd_success != mtx_unlock(&array_mutex)) {\n    \u002F* Handle error *\u002F\n  }\n}\n",[62,384,385,391,398,402,414,425,429,441,447,453,473,477,481,495,499,523,527,531,548,552,557],{"__ignoreMap":103},[107,386,387,389],{"class":109,"line":110},[107,388,114],{"class":113},[107,390,118],{"class":117},[107,392,393,395],{"class":109,"line":121},[107,394,114],{"class":113},[107,396,397],{"class":117}," \u003Cthreads.h>\n",[107,399,400],{"class":109,"line":128},[107,401,125],{"class":124},[107,403,404,406,408,410,412],{"class":109,"line":135},[107,405,211],{"class":113},[107,407,214],{"class":156},[107,409,171],{"class":124},[107,411,174],{"class":113},[107,413,221],{"class":124},[107,415,416,418,422],{"class":109,"line":141},[107,417,211],{"class":113},[107,419,421],{"class":420},"s-m8C"," mtx_t",[107,423,424],{"class":124}," array_mutex;\n",[107,426,427],{"class":109,"line":147},[107,428,205],{"emptyLinePlaceholder":7},[107,430,431,433,435,437,439],{"class":109,"line":153},[107,432,157],{"class":156},[107,434,234],{"class":160},[107,436,164],{"class":124},[107,438,157],{"class":156},[107,440,241],{"class":124},[107,442,443,445],{"class":109,"line":202},[107,444,247],{"class":156},[107,446,250],{"class":124},[107,448,449,451],{"class":109,"line":208},[107,450,256],{"class":156},[107,452,259],{"class":124},[107,454,455,457,460,463,466,468,470],{"class":109,"line":224},[107,456,291],{"class":113},[107,458,459],{"class":124}," (thrd_success ",[107,461,462],{"class":113},"!=",[107,464,465],{"class":160}," mtx_lock",[107,467,164],{"class":124},[107,469,271],{"class":113},[107,471,472],{"class":124},"array_mutex)) {\n",[107,474,475],{"class":109,"line":229},[107,476,327],{"class":131},[107,478,479],{"class":109,"line":244},[107,480,333],{"class":124},[107,482,483,485,487,489,491,493],{"class":109,"line":253},[107,484,265],{"class":160},[107,486,268],{"class":124},[107,488,271],{"class":113},[107,490,274],{"class":124},[107,492,271],{"class":113},[107,494,279],{"class":124},[107,496,497],{"class":109,"line":262},[107,498,285],{"class":131},[107,500,501,503,505,507,509,511,513,515,517,519,521],{"class":109,"line":282},[107,502,291],{"class":113},[107,504,294],{"class":124},[107,506,297],{"class":113},[107,508,300],{"class":160},[107,510,164],{"class":124},[107,512,306],{"class":305},[107,514,309],{"class":124},[107,516,271],{"class":113},[107,518,314],{"class":124},[107,520,318],{"class":317},[107,522,321],{"class":124},[107,524,525],{"class":109,"line":288},[107,526,327],{"class":131},[107,528,529],{"class":109,"line":324},[107,530,333],{"class":124},[107,532,533,535,537,539,542,544,546],{"class":109,"line":330},[107,534,291],{"class":113},[107,536,459],{"class":124},[107,538,462],{"class":113},[107,540,541],{"class":160}," mtx_unlock",[107,543,164],{"class":124},[107,545,271],{"class":113},[107,547,472],{"class":124},[107,549,550],{"class":109,"line":336},[107,551,327],{"class":131},[107,553,555],{"class":109,"line":554},20,[107,556,333],{"class":124},[107,558,560],{"class":109,"line":559},21,[107,561,339],{"class":124},[86,563,565],{"id":564},"noncompliant-code-example-gnu-glib","Noncompliant Code Example (GNU Glib)",[39,567,568,569,572,573,576],{},"This code implements a queue data structure using lock-free programming. It is implemented using glib. The function ",[62,570,571],{},"CAS()"," internally uses ",[62,574,575],{},"g_atomic_pointer_compare_and_exchange()"," .",[94,578,579],{"quality":96},[98,580,582],{"className":100,"code":581,"language":102,"meta":103,"style":103},"#include \u003Cglib.h>\n#include \u003Cglib-object.h>\n\ntypedef struct node_s {\n  void *data;\n  Node *next;\n} Node;\n\ntypedef struct queue_s {\n  Node *head;\n  Node *tail;\n} Queue;\n\nQueue* queue_new(void) {\n  Queue *q = g_slice_new(sizeof(Queue));\n  q->head = q->tail = g_slice_new(sizeof(Node));\n  return q;\n}\n\nvoid queue_enqueue(Queue *q, gpointer data) {\n  Node *node;\n  Node *tail;\n  Node *next;\n\n  node = g_slice_new(Node);\n  node->data = data;\n  node->next = NULL;\n  while (TRUE) {\n    tail = q->tail;\n    next = tail->next;\n    if (tail != q->tail) {\n      continue;\n    }\n    if (next != NULL) {\n      CAS(&q->tail, tail, next);\n      continue;\n    }\n    if (CAS(&tail->next, NULL, node)) {\n      break;\n    }\n  }\n  CAS(&q->tail, tail, node);\n}\n\ngpointer queue_dequeue(Queue *q) {\n  Node *node;\n  Node *head;\n  Node *tail;\n  Node *next;\n  gpointer data;\n\n  while (TRUE) {\n    head = q->head;\n    tail = q->tail;\n    next = head->next;\n    if (head != q->head) {\n      continue;\n    }\n    if (next == NULL) {\n      return NULL; \u002F* Empty *\u002F\n    }\n    if (head == tail) {\n      CAS(&q->tail, tail, next);\n      continue;\n    }\n    data = next->data;\n    if (CAS(&q->head, head, next)) {\n      break;\n    }\n  }\n  g_slice_free(Node, head);\n  return data;\n}\n",[62,583,584,591,598,602,613,623,634,639,643,652,661,670,675,679,695,719,740,748,752,756,779,788,797,806,811,824,835,848,861,872,883,897,905,911,925,938,945,950,973,981,986,991,1004,1009,1014,1031,1040,1049,1058,1067,1073,1078,1089,1100,1109,1119,1132,1139,1144,1158,1172,1177,1189,1200,1207,1212,1223,1239,1246,1251,1256,1265,1272],{"__ignoreMap":103},[107,585,586,588],{"class":109,"line":110},[107,587,114],{"class":113},[107,589,590],{"class":117}," \u003Cglib.h>\n",[107,592,593,595],{"class":109,"line":121},[107,594,114],{"class":113},[107,596,597],{"class":117}," \u003Cglib-object.h>\n",[107,599,600],{"class":109,"line":128},[107,601,205],{"emptyLinePlaceholder":7},[107,603,604,607,610],{"class":109,"line":135},[107,605,606],{"class":113},"typedef",[107,608,609],{"class":156}," struct",[107,611,612],{"class":124}," node_s {\n",[107,614,615,618,620],{"class":109,"line":141},[107,616,617],{"class":156},"  void",[107,619,183],{"class":113},[107,621,622],{"class":124},"data;\n",[107,624,625,628,631],{"class":109,"line":147},[107,626,627],{"class":124},"  Node ",[107,629,630],{"class":113},"*",[107,632,633],{"class":124},"next;\n",[107,635,636],{"class":109,"line":153},[107,637,638],{"class":124},"} Node;\n",[107,640,641],{"class":109,"line":202},[107,642,205],{"emptyLinePlaceholder":7},[107,644,645,647,649],{"class":109,"line":208},[107,646,606],{"class":113},[107,648,609],{"class":156},[107,650,651],{"class":124}," queue_s {\n",[107,653,654,656,658],{"class":109,"line":224},[107,655,627],{"class":124},[107,657,630],{"class":113},[107,659,660],{"class":124},"head;\n",[107,662,663,665,667],{"class":109,"line":229},[107,664,627],{"class":124},[107,666,630],{"class":113},[107,668,669],{"class":124},"tail;\n",[107,671,672],{"class":109,"line":244},[107,673,674],{"class":124},"} Queue;\n",[107,676,677],{"class":109,"line":253},[107,678,205],{"emptyLinePlaceholder":7},[107,680,681,684,686,689,691,693],{"class":109,"line":262},[107,682,683],{"class":124},"Queue",[107,685,630],{"class":113},[107,687,688],{"class":160}," queue_new",[107,690,164],{"class":124},[107,692,157],{"class":156},[107,694,241],{"class":124},[107,696,697,700,702,705,708,711,713,716],{"class":109,"line":282},[107,698,699],{"class":124},"  Queue ",[107,701,630],{"class":113},[107,703,704],{"class":124},"q ",[107,706,707],{"class":113},"=",[107,709,710],{"class":160}," g_slice_new",[107,712,164],{"class":124},[107,714,715],{"class":113},"sizeof",[107,717,718],{"class":124},"(Queue));\n",[107,720,721,724,726,729,731,733,735,737],{"class":109,"line":288},[107,722,723],{"class":124},"  q->head ",[107,725,707],{"class":113},[107,727,728],{"class":124}," q->tail ",[107,730,707],{"class":113},[107,732,710],{"class":160},[107,734,164],{"class":124},[107,736,715],{"class":113},[107,738,739],{"class":124},"(Node));\n",[107,741,742,745],{"class":109,"line":324},[107,743,744],{"class":113},"  return",[107,746,747],{"class":124}," q;\n",[107,749,750],{"class":109,"line":330},[107,751,339],{"class":124},[107,753,754],{"class":109,"line":336},[107,755,205],{"emptyLinePlaceholder":7},[107,757,758,760,763,766,768,771,774,777],{"class":109,"line":554},[107,759,157],{"class":156},[107,761,762],{"class":160}," queue_enqueue",[107,764,765],{"class":124},"(Queue ",[107,767,630],{"class":113},[107,769,770],{"class":170},"q",[107,772,773],{"class":124},", gpointer ",[107,775,776],{"class":170},"data",[107,778,241],{"class":124},[107,780,781,783,785],{"class":109,"line":559},[107,782,627],{"class":124},[107,784,630],{"class":113},[107,786,787],{"class":124},"node;\n",[107,789,791,793,795],{"class":109,"line":790},22,[107,792,627],{"class":124},[107,794,630],{"class":113},[107,796,669],{"class":124},[107,798,800,802,804],{"class":109,"line":799},23,[107,801,627],{"class":124},[107,803,630],{"class":113},[107,805,633],{"class":124},[107,807,809],{"class":109,"line":808},24,[107,810,205],{"emptyLinePlaceholder":7},[107,812,814,817,819,821],{"class":109,"line":813},25,[107,815,816],{"class":124},"  node ",[107,818,707],{"class":113},[107,820,710],{"class":160},[107,822,823],{"class":124},"(Node);\n",[107,825,827,830,832],{"class":109,"line":826},26,[107,828,829],{"class":124},"  node->data ",[107,831,707],{"class":113},[107,833,834],{"class":124}," data;\n",[107,836,838,841,843,846],{"class":109,"line":837},27,[107,839,840],{"class":124},"  node->next ",[107,842,707],{"class":113},[107,844,845],{"class":317}," NULL",[107,847,221],{"class":124},[107,849,851,854,856,859],{"class":109,"line":850},28,[107,852,853],{"class":113},"  while",[107,855,294],{"class":124},[107,857,858],{"class":317},"TRUE",[107,860,241],{"class":124},[107,862,864,867,869],{"class":109,"line":863},29,[107,865,866],{"class":124},"    tail ",[107,868,707],{"class":113},[107,870,871],{"class":124}," q->tail;\n",[107,873,875,878,880],{"class":109,"line":874},30,[107,876,877],{"class":124},"    next ",[107,879,707],{"class":113},[107,881,882],{"class":124}," tail->next;\n",[107,884,886,889,892,894],{"class":109,"line":885},31,[107,887,888],{"class":113},"    if",[107,890,891],{"class":124}," (tail ",[107,893,462],{"class":113},[107,895,896],{"class":124}," q->tail) {\n",[107,898,900,903],{"class":109,"line":899},32,[107,901,902],{"class":113},"      continue",[107,904,221],{"class":124},[107,906,908],{"class":109,"line":907},33,[107,909,910],{"class":124},"    }\n",[107,912,914,916,919,921,923],{"class":109,"line":913},34,[107,915,888],{"class":113},[107,917,918],{"class":124}," (next ",[107,920,462],{"class":113},[107,922,845],{"class":317},[107,924,241],{"class":124},[107,926,928,931,933,935],{"class":109,"line":927},35,[107,929,930],{"class":160},"      CAS",[107,932,164],{"class":124},[107,934,271],{"class":113},[107,936,937],{"class":124},"q->tail, tail, next);\n",[107,939,941,943],{"class":109,"line":940},36,[107,942,902],{"class":113},[107,944,221],{"class":124},[107,946,948],{"class":109,"line":947},37,[107,949,910],{"class":124},[107,951,953,955,957,960,962,964,967,970],{"class":109,"line":952},38,[107,954,888],{"class":113},[107,956,294],{"class":124},[107,958,959],{"class":160},"CAS",[107,961,164],{"class":124},[107,963,271],{"class":113},[107,965,966],{"class":124},"tail->next, ",[107,968,969],{"class":317},"NULL",[107,971,972],{"class":124},", node)) {\n",[107,974,976,979],{"class":109,"line":975},39,[107,977,978],{"class":113},"      break",[107,980,221],{"class":124},[107,982,984],{"class":109,"line":983},40,[107,985,910],{"class":124},[107,987,989],{"class":109,"line":988},41,[107,990,333],{"class":124},[107,992,994,997,999,1001],{"class":109,"line":993},42,[107,995,996],{"class":160},"  CAS",[107,998,164],{"class":124},[107,1000,271],{"class":113},[107,1002,1003],{"class":124},"q->tail, tail, node);\n",[107,1005,1007],{"class":109,"line":1006},43,[107,1008,339],{"class":124},[107,1010,1012],{"class":109,"line":1011},44,[107,1013,205],{"emptyLinePlaceholder":7},[107,1015,1017,1020,1023,1025,1027,1029],{"class":109,"line":1016},45,[107,1018,1019],{"class":124},"gpointer ",[107,1021,1022],{"class":160},"queue_dequeue",[107,1024,765],{"class":124},[107,1026,630],{"class":113},[107,1028,770],{"class":170},[107,1030,241],{"class":124},[107,1032,1034,1036,1038],{"class":109,"line":1033},46,[107,1035,627],{"class":124},[107,1037,630],{"class":113},[107,1039,787],{"class":124},[107,1041,1043,1045,1047],{"class":109,"line":1042},47,[107,1044,627],{"class":124},[107,1046,630],{"class":113},[107,1048,660],{"class":124},[107,1050,1052,1054,1056],{"class":109,"line":1051},48,[107,1053,627],{"class":124},[107,1055,630],{"class":113},[107,1057,669],{"class":124},[107,1059,1061,1063,1065],{"class":109,"line":1060},49,[107,1062,627],{"class":124},[107,1064,630],{"class":113},[107,1066,633],{"class":124},[107,1068,1070],{"class":109,"line":1069},50,[107,1071,1072],{"class":124},"  gpointer data;\n",[107,1074,1076],{"class":109,"line":1075},51,[107,1077,205],{"emptyLinePlaceholder":7},[107,1079,1081,1083,1085,1087],{"class":109,"line":1080},52,[107,1082,853],{"class":113},[107,1084,294],{"class":124},[107,1086,858],{"class":317},[107,1088,241],{"class":124},[107,1090,1092,1095,1097],{"class":109,"line":1091},53,[107,1093,1094],{"class":124},"    head ",[107,1096,707],{"class":113},[107,1098,1099],{"class":124}," q->head;\n",[107,1101,1103,1105,1107],{"class":109,"line":1102},54,[107,1104,866],{"class":124},[107,1106,707],{"class":113},[107,1108,871],{"class":124},[107,1110,1112,1114,1116],{"class":109,"line":1111},55,[107,1113,877],{"class":124},[107,1115,707],{"class":113},[107,1117,1118],{"class":124}," head->next;\n",[107,1120,1122,1124,1127,1129],{"class":109,"line":1121},56,[107,1123,888],{"class":113},[107,1125,1126],{"class":124}," (head ",[107,1128,462],{"class":113},[107,1130,1131],{"class":124}," q->head) {\n",[107,1133,1135,1137],{"class":109,"line":1134},57,[107,1136,902],{"class":113},[107,1138,221],{"class":124},[107,1140,1142],{"class":109,"line":1141},58,[107,1143,910],{"class":124},[107,1145,1147,1149,1151,1154,1156],{"class":109,"line":1146},59,[107,1148,888],{"class":113},[107,1150,918],{"class":124},[107,1152,1153],{"class":113},"==",[107,1155,845],{"class":317},[107,1157,241],{"class":124},[107,1159,1161,1164,1166,1169],{"class":109,"line":1160},60,[107,1162,1163],{"class":113},"      return",[107,1165,845],{"class":317},[107,1167,1168],{"class":124},";",[107,1170,1171],{"class":131}," \u002F* Empty *\u002F\n",[107,1173,1175],{"class":109,"line":1174},61,[107,1176,910],{"class":124},[107,1178,1180,1182,1184,1186],{"class":109,"line":1179},62,[107,1181,888],{"class":113},[107,1183,1126],{"class":124},[107,1185,1153],{"class":113},[107,1187,1188],{"class":124}," tail) {\n",[107,1190,1192,1194,1196,1198],{"class":109,"line":1191},63,[107,1193,930],{"class":160},[107,1195,164],{"class":124},[107,1197,271],{"class":113},[107,1199,937],{"class":124},[107,1201,1203,1205],{"class":109,"line":1202},64,[107,1204,902],{"class":113},[107,1206,221],{"class":124},[107,1208,1210],{"class":109,"line":1209},65,[107,1211,910],{"class":124},[107,1213,1215,1218,1220],{"class":109,"line":1214},66,[107,1216,1217],{"class":124},"    data ",[107,1219,707],{"class":113},[107,1221,1222],{"class":124}," next->data;\n",[107,1224,1226,1228,1230,1232,1234,1236],{"class":109,"line":1225},67,[107,1227,888],{"class":113},[107,1229,294],{"class":124},[107,1231,959],{"class":160},[107,1233,164],{"class":124},[107,1235,271],{"class":113},[107,1237,1238],{"class":124},"q->head, head, next)) {\n",[107,1240,1242,1244],{"class":109,"line":1241},68,[107,1243,978],{"class":113},[107,1245,221],{"class":124},[107,1247,1249],{"class":109,"line":1248},69,[107,1250,910],{"class":124},[107,1252,1254],{"class":109,"line":1253},70,[107,1255,333],{"class":124},[107,1257,1259,1262],{"class":109,"line":1258},71,[107,1260,1261],{"class":160},"  g_slice_free",[107,1263,1264],{"class":124},"(Node, head);\n",[107,1266,1268,1270],{"class":109,"line":1267},72,[107,1269,744],{"class":113},[107,1271,834],{"class":124},[107,1273,1275],{"class":109,"line":1274},73,[107,1276,339],{"class":124},[39,1278,1279,1280,1283,1284,1287],{},"Assume there are two threads ( ",[62,1281,1282],{},"T1"," and ",[62,1285,1286],{},"T2"," ) operating simultaneously on the queue. The queue looks like this:",[1289,1290,1291],"blockquote",{},[39,1292,1293],{},[62,1294,1295],{},"   head -> A -> B -> C -> tail  ",[39,1297,1298],{},"The following sequence of operations occurs:",[1300,1301,1304,1317],"table",{"className":1302},[1303],"wrapped",[1305,1306,1307,1311,1313,1315],"colgroup",{},[1308,1309],"col",{"style":1310},"width: 25%",[1308,1312],{"style":1310},[1308,1314],{"style":1310},[1308,1316],{"style":1310},[1318,1319,1320,1346,1400,1429,1456,1483,1510,1540],"tbody",{},[1321,1322,1325,1331,1336,1341],"tr",{"className":1323},[1324],"header",[1326,1327,1328],"th",{},[39,1329,1330],{},"Thread",[1326,1332,1333],{},[39,1334,1335],{},"Queue Before",[1326,1337,1338],{},[39,1339,1340],{},"Operation",[1326,1342,1343],{},[39,1344,1345],{},"Queue After",[1321,1347,1350,1358,1365,1394],{"className":1348},[1349],"odd",[1351,1352,1353],"td",{},[39,1354,1355],{},[62,1356,1357],{},"       T1      ",[1351,1359,1360],{},[39,1361,1362],{},[62,1363,1364],{},"       head -> A -> B -> C -> tail      ",[1351,1366,1367],{},[39,1368,1369,1370,1373,1374,1377,1380,1382,1385,1387,1388,1391,1393],{},"Enters ",[62,1371,1372],{},"       queue_dequeue()      "," function",[1375,1376],"br",{},[62,1378,1379],{},"       head = A, tail = C      ",[1375,1381],{},[62,1383,1384],{},"       next = B      ",[1375,1386],{},"\nafter executing ",[62,1389,1390],{},"       data = next->data;      ",[1375,1392],{},"\nThis thread gets preempted",[1351,1395,1396],{},[39,1397,1398],{},[62,1399,1364],{},[1321,1401,1404,1411,1417,1422],{"className":1402},[1403],"even",[1351,1405,1406],{},[39,1407,1408],{},[62,1409,1410],{},"       T2      ",[1351,1412,1413],{},[39,1414,1415],{},[62,1416,1364],{},[1351,1418,1419],{},[39,1420,1421],{},"Removes node A",[1351,1423,1424],{},[39,1425,1426],{},[62,1427,1428],{},"       head -> B -> C -> tail      ",[1321,1430,1432,1438,1444,1449],{"className":1431},[1349],[1351,1433,1434],{},[39,1435,1436],{},[62,1437,1410],{},[1351,1439,1440],{},[39,1441,1442],{},[62,1443,1428],{},[1351,1445,1446],{},[39,1447,1448],{},"Removes node B",[1351,1450,1451],{},[39,1452,1453],{},[62,1454,1455],{},"       head -> C -> tail      ",[1321,1457,1459,1465,1471,1476],{"className":1458},[1403],[1351,1460,1461],{},[39,1462,1463],{},[62,1464,1410],{},[1351,1466,1467],{},[39,1468,1469],{},[62,1470,1455],{},[1351,1472,1473],{},[39,1474,1475],{},"Enqueues node A back into the queue",[1351,1477,1478],{},[39,1479,1480],{},[62,1481,1482],{},"       head -> C -> A -> tail      ",[1321,1484,1486,1492,1498,1503],{"className":1485},[1349],[1351,1487,1488],{},[39,1489,1490],{},[62,1491,1410],{},[1351,1493,1494],{},[39,1495,1496],{},[62,1497,1482],{},[1351,1499,1500],{},[39,1501,1502],{},"Removes node C",[1351,1504,1505],{},[39,1506,1507],{},[62,1508,1509],{},"       head -> A -> tail      ",[1321,1511,1513,1519,1525,1533],{"className":1512},[1403],[1351,1514,1515],{},[39,1516,1517],{},[62,1518,1410],{},[1351,1520,1521],{},[39,1522,1523],{},[62,1524,1509],{},[1351,1526,1527],{},[39,1528,1529,1530,1532],{},"Enqueues a new node D",[1375,1531],{},"\nAfter enqueue operation, thread 2 gets preempted",[1351,1534,1535],{},[39,1536,1537],{},[62,1538,1539],{},"       head -> A -> D -> tail      ",[1321,1541,1543,1549,1555,1573],{"className":1542},[1349],[1351,1544,1545],{},[39,1546,1547],{},[62,1548,1357],{},[1351,1550,1551],{},[39,1552,1553],{},[62,1554,1539],{},[1351,1556,1557],{},[39,1558,1559,1560,1562,1563,1566,1567,1569,1570,1572],{},"Thread 1 starts execution",[1375,1561],{},"\nCompares the local head = ",[62,1564,1565],{},"       q->head      "," = A (true in this case)",[1375,1568],{},"\nUpdates ",[62,1571,1565],{}," with node B (but node B is removed)",[1351,1574,1575],{},[39,1576,1577],{},[1578,1579,1580],"strong",{},"undefined {}",[39,1582,1583,1584,1587,1588,1591,1592,1595,1596,576],{},"According to the sequence of events in this table, ",[62,1585,1586],{},"head"," will now point to memory that was freed. Also, if reclaimed memory is returned to the operating system (for example, using ",[62,1589,1590],{},"munmap()"," ), access to such memory locations can result in fatal access violation errors. The ABA problem occurred because of the ",[81,1593,1594],{},"internal reuse of nodes that have been popped off the list"," or the ",[81,1597,1598],{},"reclamation of memory occupied by removed nodes",[86,1600,1602],{"id":1601},"compliant-solution-gnu-glib-hazard-pointers","Compliant Solution (GNU Glib, Hazard Pointers)",[39,1604,1605,1606,1611],{},"According to [ ",[1607,1608,1610],"a",{"href":1609},"\u002Fsei-cert-c-coding-standard\u002Fback-matter\u002Faa-bibliography#AA.Bibliography-Michael2004","Michael 2004"," ], t he core idea is to associate a number (typically one or two) of single-writer, multi-reader shared pointers, called hazard pointers, with each thread that intends to access lock-free dynamic objects. A hazard pointer either has a null value or points to a node that may be accessed later by that thread without further validation that the reference to the node is still valid. Each hazard pointer may be written only by its owner thread but may be read by other threads.",[39,1613,1614,1615,1618],{},"In this solution, communication with the associated algorithms is accomplished only through hazard pointers and a procedure ",[62,1616,1617],{},"RetireNode()"," that is called by threads to pass the addresses of retired nodes.",[1620,1621,1623],"h5",{"id":1622},"pseudocode",[1578,1624,1625],{},"PSEUDOCODE",[94,1627,1628],{"quality":379},[98,1629,1631],{"className":100,"code":1630,"language":102,"meta":103,"style":103},"\u002F* Hazard pointers types and structure *\u002F\nstructure HPRecType {\n  HP[K]:*Nodetype;\n  Next:*HPRecType;\n}\n \n\u002F* The header of the HPRec list *\u002F\nHeadHPRec: *HPRecType;\n\u002F* Per-thread private variables *\u002F\nrlist: listType; \u002F* Initially empty *\u002F\nrcount: integer; \u002F* Initially 0 *\u002F\n\n\u002F* The retired node routine *\u002F\nRetiredNode(node:*NodeType) {\n  rlist.push(node);\n  rcount++;\n  if(rcount >= R)\n    Scan(HeadHPRec);\n}\n\n\u002F* The scan routine *\u002F\nScan(head:*HPRecType) {\n  \u002F* Stage 1: Scan HP list and insert non-null values in plist *\u002F\n  plist.init();\n  hprec\u003C-head;\n  while (hprec != NULL) {\n    for (i\u003C-0 to K-1) {\n      hptr\u003C-hprec^HP[i];\n      if (hptr!= NULL)\n        plist.insert(hptr);\n    }\n    hprec\u003C-hprec^Next;\n  }\n\n  \u002F* Stage 2: search plist *\u002F\n  tmplist\u003C-rlist.popAll();\n  rcount\u003C-0;\n  node\u003C-tmplist.pop();\n  while (node != NULL) {\n    if (plist.lookup(node)) {\n      rlist.push(node);\n      rcount++;\n    }\n    else {\n      PrepareForReuse(node);\n    }\n    node\u003C-tmplist.pop();\n  }\n  plist.free();\n}\n",[62,1632,1633,1638,1643,1656,1666,1670,1674,1679,1688,1693,1701,1709,1713,1718,1733,1744,1754,1767,1775,1779,1783,1788,1803,1808,1819,1829,1842,1865,1884,1899,1910,1914,1928,1932,1936,1941,1956,1966,1981,1994,2007,2016,2025,2029,2037,2044,2048,2061,2065,2074],{"__ignoreMap":103},[107,1634,1635],{"class":109,"line":110},[107,1636,1637],{"class":131},"\u002F* Hazard pointers types and structure *\u002F\n",[107,1639,1640],{"class":109,"line":121},[107,1641,1642],{"class":124},"structure HPRecType {\n",[107,1644,1645,1648,1651,1653],{"class":109,"line":128},[107,1646,1647],{"class":305},"  HP",[107,1649,1650],{"class":124},"[K]:",[107,1652,630],{"class":113},[107,1654,1655],{"class":124},"Nodetype;\n",[107,1657,1658,1661,1663],{"class":109,"line":135},[107,1659,1660],{"class":124},"  Next:",[107,1662,630],{"class":113},[107,1664,1665],{"class":124},"HPRecType;\n",[107,1667,1668],{"class":109,"line":141},[107,1669,339],{"class":124},[107,1671,1672],{"class":109,"line":147},[107,1673,125],{"class":124},[107,1675,1676],{"class":109,"line":153},[107,1677,1678],{"class":131},"\u002F* The header of the HPRec list *\u002F\n",[107,1680,1681,1684,1686],{"class":109,"line":202},[107,1682,1683],{"class":124},"HeadHPRec: ",[107,1685,630],{"class":113},[107,1687,1665],{"class":124},[107,1689,1690],{"class":109,"line":208},[107,1691,1692],{"class":131},"\u002F* Per-thread private variables *\u002F\n",[107,1694,1695,1698],{"class":109,"line":224},[107,1696,1697],{"class":124},"rlist: listType;",[107,1699,1700],{"class":131}," \u002F* Initially empty *\u002F\n",[107,1702,1703,1706],{"class":109,"line":229},[107,1704,1705],{"class":124},"rcount: integer;",[107,1707,1708],{"class":131}," \u002F* Initially 0 *\u002F\n",[107,1710,1711],{"class":109,"line":244},[107,1712,205],{"emptyLinePlaceholder":7},[107,1714,1715],{"class":109,"line":253},[107,1716,1717],{"class":131},"\u002F* The retired node routine *\u002F\n",[107,1719,1720,1723,1726,1728,1731],{"class":109,"line":262},[107,1721,1722],{"class":160},"RetiredNode",[107,1724,1725],{"class":124},"(node:",[107,1727,630],{"class":113},[107,1729,1730],{"class":170},"NodeType",[107,1732,241],{"class":124},[107,1734,1735,1738,1741],{"class":109,"line":282},[107,1736,1737],{"class":124},"  rlist.",[107,1739,1740],{"class":160},"push",[107,1742,1743],{"class":124},"(node);\n",[107,1745,1746,1749,1752],{"class":109,"line":288},[107,1747,1748],{"class":124},"  rcount",[107,1750,1751],{"class":113},"++",[107,1753,221],{"class":124},[107,1755,1756,1758,1761,1764],{"class":109,"line":324},[107,1757,291],{"class":113},[107,1759,1760],{"class":124},"(rcount ",[107,1762,1763],{"class":113},">=",[107,1765,1766],{"class":124}," R)\n",[107,1768,1769,1772],{"class":109,"line":330},[107,1770,1771],{"class":160},"    Scan",[107,1773,1774],{"class":124},"(HeadHPRec);\n",[107,1776,1777],{"class":109,"line":336},[107,1778,339],{"class":124},[107,1780,1781],{"class":109,"line":554},[107,1782,205],{"emptyLinePlaceholder":7},[107,1784,1785],{"class":109,"line":559},[107,1786,1787],{"class":131},"\u002F* The scan routine *\u002F\n",[107,1789,1790,1793,1796,1798,1801],{"class":109,"line":790},[107,1791,1792],{"class":160},"Scan",[107,1794,1795],{"class":124},"(head:",[107,1797,630],{"class":113},[107,1799,1800],{"class":170},"HPRecType",[107,1802,241],{"class":124},[107,1804,1805],{"class":109,"line":799},[107,1806,1807],{"class":131},"  \u002F* Stage 1: Scan HP list and insert non-null values in plist *\u002F\n",[107,1809,1810,1813,1816],{"class":109,"line":808},[107,1811,1812],{"class":124},"  plist.",[107,1814,1815],{"class":160},"init",[107,1817,1818],{"class":124},"();\n",[107,1820,1821,1824,1827],{"class":109,"line":813},[107,1822,1823],{"class":124},"  hprec",[107,1825,1826],{"class":113},"\u003C-",[107,1828,660],{"class":124},[107,1830,1831,1833,1836,1838,1840],{"class":109,"line":826},[107,1832,853],{"class":113},[107,1834,1835],{"class":124}," (hprec ",[107,1837,462],{"class":113},[107,1839,845],{"class":317},[107,1841,241],{"class":124},[107,1843,1844,1847,1850,1852,1854,1857,1860,1863],{"class":109,"line":837},[107,1845,1846],{"class":113},"    for",[107,1848,1849],{"class":124}," (i",[107,1851,1826],{"class":113},[107,1853,318],{"class":317},[107,1855,1856],{"class":124}," to K",[107,1858,1859],{"class":113},"-",[107,1861,1862],{"class":317},"1",[107,1864,241],{"class":124},[107,1866,1867,1870,1872,1875,1878,1881],{"class":109,"line":850},[107,1868,1869],{"class":124},"      hptr",[107,1871,1826],{"class":113},[107,1873,1874],{"class":124},"hprec",[107,1876,1877],{"class":113},"^",[107,1879,1880],{"class":305},"HP",[107,1882,1883],{"class":124},"[i];\n",[107,1885,1886,1889,1892,1894,1896],{"class":109,"line":863},[107,1887,1888],{"class":113},"      if",[107,1890,1891],{"class":124}," (hptr",[107,1893,462],{"class":113},[107,1895,845],{"class":317},[107,1897,1898],{"class":124},")\n",[107,1900,1901,1904,1907],{"class":109,"line":874},[107,1902,1903],{"class":124},"        plist.",[107,1905,1906],{"class":160},"insert",[107,1908,1909],{"class":124},"(hptr);\n",[107,1911,1912],{"class":109,"line":885},[107,1913,910],{"class":124},[107,1915,1916,1919,1921,1923,1925],{"class":109,"line":899},[107,1917,1918],{"class":124},"    hprec",[107,1920,1826],{"class":113},[107,1922,1874],{"class":124},[107,1924,1877],{"class":113},[107,1926,1927],{"class":124},"Next;\n",[107,1929,1930],{"class":109,"line":907},[107,1931,333],{"class":124},[107,1933,1934],{"class":109,"line":913},[107,1935,205],{"emptyLinePlaceholder":7},[107,1937,1938],{"class":109,"line":927},[107,1939,1940],{"class":131},"  \u002F* Stage 2: search plist *\u002F\n",[107,1942,1943,1946,1948,1951,1954],{"class":109,"line":940},[107,1944,1945],{"class":124},"  tmplist",[107,1947,1826],{"class":113},[107,1949,1950],{"class":124},"rlist.",[107,1952,1953],{"class":160},"popAll",[107,1955,1818],{"class":124},[107,1957,1958,1960,1962,1964],{"class":109,"line":947},[107,1959,1748],{"class":124},[107,1961,1826],{"class":113},[107,1963,318],{"class":317},[107,1965,221],{"class":124},[107,1967,1968,1971,1973,1976,1979],{"class":109,"line":952},[107,1969,1970],{"class":124},"  node",[107,1972,1826],{"class":113},[107,1974,1975],{"class":124},"tmplist.",[107,1977,1978],{"class":160},"pop",[107,1980,1818],{"class":124},[107,1982,1983,1985,1988,1990,1992],{"class":109,"line":975},[107,1984,853],{"class":113},[107,1986,1987],{"class":124}," (node ",[107,1989,462],{"class":113},[107,1991,845],{"class":317},[107,1993,241],{"class":124},[107,1995,1996,1998,2001,2004],{"class":109,"line":983},[107,1997,888],{"class":113},[107,1999,2000],{"class":124}," (plist.",[107,2002,2003],{"class":160},"lookup",[107,2005,2006],{"class":124},"(node)) {\n",[107,2008,2009,2012,2014],{"class":109,"line":988},[107,2010,2011],{"class":124},"      rlist.",[107,2013,1740],{"class":160},[107,2015,1743],{"class":124},[107,2017,2018,2021,2023],{"class":109,"line":993},[107,2019,2020],{"class":124},"      rcount",[107,2022,1751],{"class":113},[107,2024,221],{"class":124},[107,2026,2027],{"class":109,"line":1006},[107,2028,910],{"class":124},[107,2030,2031,2034],{"class":109,"line":1011},[107,2032,2033],{"class":113},"    else",[107,2035,2036],{"class":124}," {\n",[107,2038,2039,2042],{"class":109,"line":1016},[107,2040,2041],{"class":160},"      PrepareForReuse",[107,2043,1743],{"class":124},[107,2045,2046],{"class":109,"line":1033},[107,2047,910],{"class":124},[107,2049,2050,2053,2055,2057,2059],{"class":109,"line":1042},[107,2051,2052],{"class":124},"    node",[107,2054,1826],{"class":113},[107,2056,1975],{"class":124},[107,2058,1978],{"class":160},[107,2060,1818],{"class":124},[107,2062,2063],{"class":109,"line":1051},[107,2064,333],{"class":124},[107,2066,2067,2069,2072],{"class":109,"line":1060},[107,2068,1812],{"class":124},[107,2070,2071],{"class":160},"free",[107,2073,1818],{"class":124},[107,2075,2076],{"class":109,"line":1069},[107,2077,339],{"class":124},[39,2079,2080,2081,2084,2085,2088,2089,2091,2092,2094,2095,2097],{},"The scan consists of two stages. The first stage involves scanning the hazard pointer list for non-null values. Whenever a non-null value is encountered, it is inserted in a local list, ",[62,2082,2083],{},"plist"," , which can be implemented as a hash table. The second stage involves checking each node in ",[62,2086,2087],{},"rlist"," against the pointers in ",[62,2090,2083],{}," . If the lookup yields no match, the node is identified to be ready for arbitrary reuse. Otherwise, it is retained in ",[62,2093,2087],{}," until the next scan by the current thread. Insertion and lookup in ",[62,2096,2083],{}," take constant expected time. The task of the memory reclamation method is to determine when a retired node is safely eligible for reuse while allowing memory reclamation.",[39,2099,2100,2101,2105],{},"In the ",[1607,2102,2104],{"href":2103},"\u002Fsei-cert-c-coding-standard\u002Fback-matter\u002Fbb-definitions#BB.Definitions-implementation","implementation"," , the pointer being removed is stored in the hazard pointer, preventing other threads from reusing it and thereby avoiding the ABA problem.",[1620,2107,2108],{"id":62},[1578,2109,2110],{},"CODE",[94,2112,2113],{"quality":379},[98,2114,2116],{"className":100,"code":2115,"language":102,"meta":103,"style":103},"#include \u003Cglib.h>\n#include \u003Cglib-object.h>\n \nvoid queue_enqueue(Queue *q, gpointer data) {\n  Node *node;\n  Node *tail;\n  Node *next;\n\n  node = g_slice_new(Node);\n  node->data = data;\n  node->next = NULL;\n  while (TRUE) {\n    tail = q->tail;\n    HAZARD_SET(0, tail);  \u002F* Mark tail as hazardous *\u002F\n    if (tail != q->tail) {  \u002F* Check tail hasn't changed *\u002F\n      continue;\n    }\n    next = tail->next;\n    if (tail != q->tail) {\n      continue;\n    }\n    if (next != NULL) {\n      CAS(&q->tail, tail, next);\n      continue;\n    }\n    if (CAS(&tail->next, null, node) {\n      break;\n    }\n  }\n  CAS(&q->tail, tail, node);\n}\n\ngpointer queue_dequeue(Queue *q) {\n  Node *node;\n  Node *head;\n  Node *tail;\n  Node *next;\n  gpointer data;\n\n  while (TRUE) {\n    head = q->head;\n    LF_HAZARD_SET(0, head);  \u002F* Mark head as hazardous *\u002F\n    if (head != q->head) {  \u002F* Check head hasn't changed *\u002F\n      continue;\n    }\n    tail = q->tail;\n    next = head->next;\n    LF_HAZARD_SET(1, next);  \u002F* Mark next as hazardous *\u002F\n    if (head != q->head) {\n      continue;\n    }\n    if (next == NULL) {\n      return NULL; \u002F* Empty *\u002F\n    }\n    if (head == tail) {\n      CAS(&q->tail, tail, next);\n      continue;\n    }\n    data = next->data;\n    if (CAS(&q->head, head, next)) {\n      break;\n    }\n  }\n  LF_HAZARD_UNSET(head);  \u002F*\n                           * Retire head, and perform\n                           * reclamation if needed.\n                           *\u002F\n  return data;\n}\n",[62,2117,2118,2124,2130,2134,2152,2160,2168,2176,2180,2190,2198,2208,2218,2226,2241,2255,2261,2265,2273,2283,2289,2293,2305,2315,2321,2325,2340,2346,2350,2354,2364,2368,2372,2385,2393,2401,2409,2417,2421,2425,2435,2443,2458,2472,2478,2482,2490,2498,2512,2522,2528,2532,2544,2554,2558,2568,2578,2584,2588,2596,2610,2616,2620,2624,2635,2640,2645,2650,2656],{"__ignoreMap":103},[107,2119,2120,2122],{"class":109,"line":110},[107,2121,114],{"class":113},[107,2123,590],{"class":117},[107,2125,2126,2128],{"class":109,"line":121},[107,2127,114],{"class":113},[107,2129,597],{"class":117},[107,2131,2132],{"class":109,"line":128},[107,2133,125],{"class":124},[107,2135,2136,2138,2140,2142,2144,2146,2148,2150],{"class":109,"line":135},[107,2137,157],{"class":156},[107,2139,762],{"class":160},[107,2141,765],{"class":124},[107,2143,630],{"class":113},[107,2145,770],{"class":170},[107,2147,773],{"class":124},[107,2149,776],{"class":170},[107,2151,241],{"class":124},[107,2153,2154,2156,2158],{"class":109,"line":141},[107,2155,627],{"class":124},[107,2157,630],{"class":113},[107,2159,787],{"class":124},[107,2161,2162,2164,2166],{"class":109,"line":147},[107,2163,627],{"class":124},[107,2165,630],{"class":113},[107,2167,669],{"class":124},[107,2169,2170,2172,2174],{"class":109,"line":153},[107,2171,627],{"class":124},[107,2173,630],{"class":113},[107,2175,633],{"class":124},[107,2177,2178],{"class":109,"line":202},[107,2179,205],{"emptyLinePlaceholder":7},[107,2181,2182,2184,2186,2188],{"class":109,"line":208},[107,2183,816],{"class":124},[107,2185,707],{"class":113},[107,2187,710],{"class":160},[107,2189,823],{"class":124},[107,2191,2192,2194,2196],{"class":109,"line":224},[107,2193,829],{"class":124},[107,2195,707],{"class":113},[107,2197,834],{"class":124},[107,2199,2200,2202,2204,2206],{"class":109,"line":229},[107,2201,840],{"class":124},[107,2203,707],{"class":113},[107,2205,845],{"class":317},[107,2207,221],{"class":124},[107,2209,2210,2212,2214,2216],{"class":109,"line":244},[107,2211,853],{"class":113},[107,2213,294],{"class":124},[107,2215,858],{"class":317},[107,2217,241],{"class":124},[107,2219,2220,2222,2224],{"class":109,"line":253},[107,2221,866],{"class":124},[107,2223,707],{"class":113},[107,2225,871],{"class":124},[107,2227,2228,2231,2233,2235,2238],{"class":109,"line":262},[107,2229,2230],{"class":160},"    HAZARD_SET",[107,2232,164],{"class":124},[107,2234,318],{"class":317},[107,2236,2237],{"class":124},", tail);",[107,2239,2240],{"class":131},"  \u002F* Mark tail as hazardous *\u002F\n",[107,2242,2243,2245,2247,2249,2252],{"class":109,"line":282},[107,2244,888],{"class":113},[107,2246,891],{"class":124},[107,2248,462],{"class":113},[107,2250,2251],{"class":124}," q->tail) {",[107,2253,2254],{"class":131},"  \u002F* Check tail hasn't changed *\u002F\n",[107,2256,2257,2259],{"class":109,"line":288},[107,2258,902],{"class":113},[107,2260,221],{"class":124},[107,2262,2263],{"class":109,"line":324},[107,2264,910],{"class":124},[107,2266,2267,2269,2271],{"class":109,"line":330},[107,2268,877],{"class":124},[107,2270,707],{"class":113},[107,2272,882],{"class":124},[107,2274,2275,2277,2279,2281],{"class":109,"line":336},[107,2276,888],{"class":113},[107,2278,891],{"class":124},[107,2280,462],{"class":113},[107,2282,896],{"class":124},[107,2284,2285,2287],{"class":109,"line":554},[107,2286,902],{"class":113},[107,2288,221],{"class":124},[107,2290,2291],{"class":109,"line":559},[107,2292,910],{"class":124},[107,2294,2295,2297,2299,2301,2303],{"class":109,"line":790},[107,2296,888],{"class":113},[107,2298,918],{"class":124},[107,2300,462],{"class":113},[107,2302,845],{"class":317},[107,2304,241],{"class":124},[107,2306,2307,2309,2311,2313],{"class":109,"line":799},[107,2308,930],{"class":160},[107,2310,164],{"class":124},[107,2312,271],{"class":113},[107,2314,937],{"class":124},[107,2316,2317,2319],{"class":109,"line":808},[107,2318,902],{"class":113},[107,2320,221],{"class":124},[107,2322,2323],{"class":109,"line":813},[107,2324,910],{"class":124},[107,2326,2327,2329,2331,2333,2335,2337],{"class":109,"line":826},[107,2328,888],{"class":113},[107,2330,294],{"class":124},[107,2332,959],{"class":160},[107,2334,164],{"class":124},[107,2336,271],{"class":113},[107,2338,2339],{"class":124},"tail->next, null, node) {\n",[107,2341,2342,2344],{"class":109,"line":837},[107,2343,978],{"class":113},[107,2345,221],{"class":124},[107,2347,2348],{"class":109,"line":850},[107,2349,910],{"class":124},[107,2351,2352],{"class":109,"line":863},[107,2353,333],{"class":124},[107,2355,2356,2358,2360,2362],{"class":109,"line":874},[107,2357,996],{"class":160},[107,2359,164],{"class":124},[107,2361,271],{"class":113},[107,2363,1003],{"class":124},[107,2365,2366],{"class":109,"line":885},[107,2367,339],{"class":124},[107,2369,2370],{"class":109,"line":899},[107,2371,205],{"emptyLinePlaceholder":7},[107,2373,2374,2376,2378,2380,2382],{"class":109,"line":907},[107,2375,1019],{"class":124},[107,2377,1022],{"class":160},[107,2379,765],{"class":124},[107,2381,630],{"class":113},[107,2383,2384],{"class":124},"q) {\n",[107,2386,2387,2389,2391],{"class":109,"line":913},[107,2388,627],{"class":124},[107,2390,630],{"class":113},[107,2392,787],{"class":124},[107,2394,2395,2397,2399],{"class":109,"line":927},[107,2396,627],{"class":124},[107,2398,630],{"class":113},[107,2400,660],{"class":124},[107,2402,2403,2405,2407],{"class":109,"line":940},[107,2404,627],{"class":124},[107,2406,630],{"class":113},[107,2408,669],{"class":124},[107,2410,2411,2413,2415],{"class":109,"line":947},[107,2412,627],{"class":124},[107,2414,630],{"class":113},[107,2416,633],{"class":124},[107,2418,2419],{"class":109,"line":952},[107,2420,1072],{"class":124},[107,2422,2423],{"class":109,"line":975},[107,2424,205],{"emptyLinePlaceholder":7},[107,2426,2427,2429,2431,2433],{"class":109,"line":983},[107,2428,853],{"class":113},[107,2430,294],{"class":124},[107,2432,858],{"class":317},[107,2434,241],{"class":124},[107,2436,2437,2439,2441],{"class":109,"line":988},[107,2438,1094],{"class":124},[107,2440,707],{"class":113},[107,2442,1099],{"class":124},[107,2444,2445,2448,2450,2452,2455],{"class":109,"line":993},[107,2446,2447],{"class":160},"    LF_HAZARD_SET",[107,2449,164],{"class":124},[107,2451,318],{"class":317},[107,2453,2454],{"class":124},", head);",[107,2456,2457],{"class":131},"  \u002F* Mark head as hazardous *\u002F\n",[107,2459,2460,2462,2464,2466,2469],{"class":109,"line":1006},[107,2461,888],{"class":113},[107,2463,1126],{"class":124},[107,2465,462],{"class":113},[107,2467,2468],{"class":124}," q->head) {",[107,2470,2471],{"class":131},"  \u002F* Check head hasn't changed *\u002F\n",[107,2473,2474,2476],{"class":109,"line":1011},[107,2475,902],{"class":113},[107,2477,221],{"class":124},[107,2479,2480],{"class":109,"line":1016},[107,2481,910],{"class":124},[107,2483,2484,2486,2488],{"class":109,"line":1033},[107,2485,866],{"class":124},[107,2487,707],{"class":113},[107,2489,871],{"class":124},[107,2491,2492,2494,2496],{"class":109,"line":1042},[107,2493,877],{"class":124},[107,2495,707],{"class":113},[107,2497,1118],{"class":124},[107,2499,2500,2502,2504,2506,2509],{"class":109,"line":1051},[107,2501,2447],{"class":160},[107,2503,164],{"class":124},[107,2505,1862],{"class":317},[107,2507,2508],{"class":124},", next);",[107,2510,2511],{"class":131},"  \u002F* Mark next as hazardous *\u002F\n",[107,2513,2514,2516,2518,2520],{"class":109,"line":1060},[107,2515,888],{"class":113},[107,2517,1126],{"class":124},[107,2519,462],{"class":113},[107,2521,1131],{"class":124},[107,2523,2524,2526],{"class":109,"line":1069},[107,2525,902],{"class":113},[107,2527,221],{"class":124},[107,2529,2530],{"class":109,"line":1075},[107,2531,910],{"class":124},[107,2533,2534,2536,2538,2540,2542],{"class":109,"line":1080},[107,2535,888],{"class":113},[107,2537,918],{"class":124},[107,2539,1153],{"class":113},[107,2541,845],{"class":317},[107,2543,241],{"class":124},[107,2545,2546,2548,2550,2552],{"class":109,"line":1091},[107,2547,1163],{"class":113},[107,2549,845],{"class":317},[107,2551,1168],{"class":124},[107,2553,1171],{"class":131},[107,2555,2556],{"class":109,"line":1102},[107,2557,910],{"class":124},[107,2559,2560,2562,2564,2566],{"class":109,"line":1111},[107,2561,888],{"class":113},[107,2563,1126],{"class":124},[107,2565,1153],{"class":113},[107,2567,1188],{"class":124},[107,2569,2570,2572,2574,2576],{"class":109,"line":1121},[107,2571,930],{"class":160},[107,2573,164],{"class":124},[107,2575,271],{"class":113},[107,2577,937],{"class":124},[107,2579,2580,2582],{"class":109,"line":1134},[107,2581,902],{"class":113},[107,2583,221],{"class":124},[107,2585,2586],{"class":109,"line":1141},[107,2587,910],{"class":124},[107,2589,2590,2592,2594],{"class":109,"line":1146},[107,2591,1217],{"class":124},[107,2593,707],{"class":113},[107,2595,1222],{"class":124},[107,2597,2598,2600,2602,2604,2606,2608],{"class":109,"line":1160},[107,2599,888],{"class":113},[107,2601,294],{"class":124},[107,2603,959],{"class":160},[107,2605,164],{"class":124},[107,2607,271],{"class":113},[107,2609,1238],{"class":124},[107,2611,2612,2614],{"class":109,"line":1174},[107,2613,978],{"class":113},[107,2615,221],{"class":124},[107,2617,2618],{"class":109,"line":1179},[107,2619,910],{"class":124},[107,2621,2622],{"class":109,"line":1191},[107,2623,333],{"class":124},[107,2625,2626,2629,2632],{"class":109,"line":1202},[107,2627,2628],{"class":160},"  LF_HAZARD_UNSET",[107,2630,2631],{"class":124},"(head);",[107,2633,2634],{"class":131},"  \u002F*\n",[107,2636,2637],{"class":109,"line":1209},[107,2638,2639],{"class":131},"                           * Retire head, and perform\n",[107,2641,2642],{"class":109,"line":1214},[107,2643,2644],{"class":131},"                           * reclamation if needed.\n",[107,2646,2647],{"class":109,"line":1225},[107,2648,2649],{"class":131},"                           *\u002F\n",[107,2651,2652,2654],{"class":109,"line":1241},[107,2653,744],{"class":113},[107,2655,834],{"class":124},[107,2657,2658],{"class":109,"line":1248},[107,2659,339],{"class":124},[86,2661,2663],{"id":2662},"compliant-solution-gnu-glib-mutex","Compliant Solution (GNU Glib, Mutex)",[39,2665,2666,2667,2670],{},"In this compliant solution, ",[62,2668,2669],{},"mtx_lock()"," is used to lock the queue. When thread 1 locks on the queue to perform any operation, thread 2 cannot perform any operation on the queue, which prevents the ABA problem.",[94,2672,2673],{"quality":379},[98,2674,2676],{"className":100,"code":2675,"language":102,"meta":103,"style":103},"#include \u003Cthreads.h>\n#include \u003Cglib-object.h>\n\ntypedef struct node_s {\n  void *data;\n  Node *next;\n} Node;\n\ntypedef struct queue_s {\n  Node *head;\n  Node *tail;\n  mtx_t mutex;\n} Queue;\n\nQueue* queue_new(void) {\n  Queue *q = g_slice_new(sizeof(Queue));\n  q->head = q->tail = g_slice_new(sizeof(Node));\n  return q;\n}\n\nint queue_enqueue(Queue *q, gpointer data) {\n  Node *node;\n  Node *tail;\n  Node *next;\n\n  \u002F*\n   * Lock the queue before accessing the contents and\n   * check the return code for success.\n   *\u002F\n  if (thrd_success != mtx_lock(&(q->mutex))) {\n    return -1;  \u002F* Indicate failure *\u002F\n  } else {\n    node = g_slice_new(Node);\n    node->data = data;\n    node->next = NULL;\n\n    if(q->head == NULL) {\n      q->head = node;\n      q->tail = node;\n    } else {\n      q->tail->next = node;\n      q->tail = node;\n    }\n    \u002F* Unlock the mutex and check the return code *\u002F\n    if (thrd_success != mtx_unlock(&(queue->mutex))) {\n      return -1;  \u002F* Indicate failure *\u002F\n    }\n  }\n  return 0;\n}\n\ngpointer queue_dequeue(Queue *q) {\n  Node *node;\n  Node *head;\n  Node *tail;\n  Node *next;\n  gpointer data;\n\n  if (thrd_success != mtx_lock(&(q->mutex)) {\n    return NULL;  \u002F* Indicate failure *\u002F\n  } else {\n    head = q->head;\n    tail = q->tail;\n    next = head->next;\n    data = next->data;\n    q->head = next;\n    g_slice_free(Node, head);\n    if (thrd_success != mtx_unlock(&(queue->mutex))) {\n      return NULL;  \u002F* Indicate failure *\u002F\n    }\n  }\n  return data;\n}\n",[62,2677,2678,2684,2690,2694,2702,2710,2718,2722,2726,2734,2742,2750,2758,2762,2766,2780,2798,2816,2822,2826,2830,2848,2856,2864,2872,2876,2880,2885,2890,2895,2912,2927,2937,2948,2957,2968,2972,2985,2995,3004,3013,3022,3030,3034,3039,3056,3068,3072,3076,3085,3089,3093,3107,3115,3123,3131,3139,3143,3147,3164,3174,3182,3190,3198,3206,3214,3224,3231,3247,3257,3261,3265,3271],{"__ignoreMap":103},[107,2679,2680,2682],{"class":109,"line":110},[107,2681,114],{"class":113},[107,2683,397],{"class":117},[107,2685,2686,2688],{"class":109,"line":121},[107,2687,114],{"class":113},[107,2689,597],{"class":117},[107,2691,2692],{"class":109,"line":128},[107,2693,205],{"emptyLinePlaceholder":7},[107,2695,2696,2698,2700],{"class":109,"line":135},[107,2697,606],{"class":113},[107,2699,609],{"class":156},[107,2701,612],{"class":124},[107,2703,2704,2706,2708],{"class":109,"line":141},[107,2705,617],{"class":156},[107,2707,183],{"class":113},[107,2709,622],{"class":124},[107,2711,2712,2714,2716],{"class":109,"line":147},[107,2713,627],{"class":124},[107,2715,630],{"class":113},[107,2717,633],{"class":124},[107,2719,2720],{"class":109,"line":153},[107,2721,638],{"class":124},[107,2723,2724],{"class":109,"line":202},[107,2725,205],{"emptyLinePlaceholder":7},[107,2727,2728,2730,2732],{"class":109,"line":208},[107,2729,606],{"class":113},[107,2731,609],{"class":156},[107,2733,651],{"class":124},[107,2735,2736,2738,2740],{"class":109,"line":224},[107,2737,627],{"class":124},[107,2739,630],{"class":113},[107,2741,660],{"class":124},[107,2743,2744,2746,2748],{"class":109,"line":229},[107,2745,627],{"class":124},[107,2747,630],{"class":113},[107,2749,669],{"class":124},[107,2751,2752,2755],{"class":109,"line":244},[107,2753,2754],{"class":420},"  mtx_t",[107,2756,2757],{"class":124}," mutex;\n",[107,2759,2760],{"class":109,"line":253},[107,2761,674],{"class":124},[107,2763,2764],{"class":109,"line":262},[107,2765,205],{"emptyLinePlaceholder":7},[107,2767,2768,2770,2772,2774,2776,2778],{"class":109,"line":282},[107,2769,683],{"class":124},[107,2771,630],{"class":113},[107,2773,688],{"class":160},[107,2775,164],{"class":124},[107,2777,157],{"class":156},[107,2779,241],{"class":124},[107,2781,2782,2784,2786,2788,2790,2792,2794,2796],{"class":109,"line":288},[107,2783,699],{"class":124},[107,2785,630],{"class":113},[107,2787,704],{"class":124},[107,2789,707],{"class":113},[107,2791,710],{"class":160},[107,2793,164],{"class":124},[107,2795,715],{"class":113},[107,2797,718],{"class":124},[107,2799,2800,2802,2804,2806,2808,2810,2812,2814],{"class":109,"line":324},[107,2801,723],{"class":124},[107,2803,707],{"class":113},[107,2805,728],{"class":124},[107,2807,707],{"class":113},[107,2809,710],{"class":160},[107,2811,164],{"class":124},[107,2813,715],{"class":113},[107,2815,739],{"class":124},[107,2817,2818,2820],{"class":109,"line":330},[107,2819,744],{"class":113},[107,2821,747],{"class":124},[107,2823,2824],{"class":109,"line":336},[107,2825,339],{"class":124},[107,2827,2828],{"class":109,"line":554},[107,2829,205],{"emptyLinePlaceholder":7},[107,2831,2832,2834,2836,2838,2840,2842,2844,2846],{"class":109,"line":559},[107,2833,191],{"class":156},[107,2835,762],{"class":160},[107,2837,765],{"class":124},[107,2839,630],{"class":113},[107,2841,770],{"class":170},[107,2843,773],{"class":124},[107,2845,776],{"class":170},[107,2847,241],{"class":124},[107,2849,2850,2852,2854],{"class":109,"line":790},[107,2851,627],{"class":124},[107,2853,630],{"class":113},[107,2855,787],{"class":124},[107,2857,2858,2860,2862],{"class":109,"line":799},[107,2859,627],{"class":124},[107,2861,630],{"class":113},[107,2863,669],{"class":124},[107,2865,2866,2868,2870],{"class":109,"line":808},[107,2867,627],{"class":124},[107,2869,630],{"class":113},[107,2871,633],{"class":124},[107,2873,2874],{"class":109,"line":813},[107,2875,205],{"emptyLinePlaceholder":7},[107,2877,2878],{"class":109,"line":826},[107,2879,2634],{"class":131},[107,2881,2882],{"class":109,"line":837},[107,2883,2884],{"class":131},"   * Lock the queue before accessing the contents and\n",[107,2886,2887],{"class":109,"line":850},[107,2888,2889],{"class":131},"   * check the return code for success.\n",[107,2891,2892],{"class":109,"line":863},[107,2893,2894],{"class":131},"   *\u002F\n",[107,2896,2897,2899,2901,2903,2905,2907,2909],{"class":109,"line":874},[107,2898,291],{"class":113},[107,2900,459],{"class":124},[107,2902,462],{"class":113},[107,2904,465],{"class":160},[107,2906,164],{"class":124},[107,2908,271],{"class":113},[107,2910,2911],{"class":124},"(q->mutex))) {\n",[107,2913,2914,2917,2920,2922,2924],{"class":109,"line":885},[107,2915,2916],{"class":113},"    return",[107,2918,2919],{"class":113}," -",[107,2921,1862],{"class":317},[107,2923,1168],{"class":124},[107,2925,2926],{"class":131},"  \u002F* Indicate failure *\u002F\n",[107,2928,2929,2932,2935],{"class":109,"line":899},[107,2930,2931],{"class":124},"  } ",[107,2933,2934],{"class":113},"else",[107,2936,2036],{"class":124},[107,2938,2939,2942,2944,2946],{"class":109,"line":907},[107,2940,2941],{"class":124},"    node ",[107,2943,707],{"class":113},[107,2945,710],{"class":160},[107,2947,823],{"class":124},[107,2949,2950,2953,2955],{"class":109,"line":913},[107,2951,2952],{"class":124},"    node->data ",[107,2954,707],{"class":113},[107,2956,834],{"class":124},[107,2958,2959,2962,2964,2966],{"class":109,"line":927},[107,2960,2961],{"class":124},"    node->next ",[107,2963,707],{"class":113},[107,2965,845],{"class":317},[107,2967,221],{"class":124},[107,2969,2970],{"class":109,"line":940},[107,2971,205],{"emptyLinePlaceholder":7},[107,2973,2974,2976,2979,2981,2983],{"class":109,"line":947},[107,2975,888],{"class":113},[107,2977,2978],{"class":124},"(q->head ",[107,2980,1153],{"class":113},[107,2982,845],{"class":317},[107,2984,241],{"class":124},[107,2986,2987,2990,2992],{"class":109,"line":952},[107,2988,2989],{"class":124},"      q->head ",[107,2991,707],{"class":113},[107,2993,2994],{"class":124}," node;\n",[107,2996,2997,3000,3002],{"class":109,"line":975},[107,2998,2999],{"class":124},"      q->tail ",[107,3001,707],{"class":113},[107,3003,2994],{"class":124},[107,3005,3006,3009,3011],{"class":109,"line":983},[107,3007,3008],{"class":124},"    } ",[107,3010,2934],{"class":113},[107,3012,2036],{"class":124},[107,3014,3015,3018,3020],{"class":109,"line":988},[107,3016,3017],{"class":124},"      q->tail->next ",[107,3019,707],{"class":113},[107,3021,2994],{"class":124},[107,3023,3024,3026,3028],{"class":109,"line":993},[107,3025,2999],{"class":124},[107,3027,707],{"class":113},[107,3029,2994],{"class":124},[107,3031,3032],{"class":109,"line":1006},[107,3033,910],{"class":124},[107,3035,3036],{"class":109,"line":1011},[107,3037,3038],{"class":131},"    \u002F* Unlock the mutex and check the return code *\u002F\n",[107,3040,3041,3043,3045,3047,3049,3051,3053],{"class":109,"line":1016},[107,3042,888],{"class":113},[107,3044,459],{"class":124},[107,3046,462],{"class":113},[107,3048,541],{"class":160},[107,3050,164],{"class":124},[107,3052,271],{"class":113},[107,3054,3055],{"class":124},"(queue->mutex))) {\n",[107,3057,3058,3060,3062,3064,3066],{"class":109,"line":1033},[107,3059,1163],{"class":113},[107,3061,2919],{"class":113},[107,3063,1862],{"class":317},[107,3065,1168],{"class":124},[107,3067,2926],{"class":131},[107,3069,3070],{"class":109,"line":1042},[107,3071,910],{"class":124},[107,3073,3074],{"class":109,"line":1051},[107,3075,333],{"class":124},[107,3077,3078,3080,3083],{"class":109,"line":1060},[107,3079,744],{"class":113},[107,3081,3082],{"class":317}," 0",[107,3084,221],{"class":124},[107,3086,3087],{"class":109,"line":1069},[107,3088,339],{"class":124},[107,3090,3091],{"class":109,"line":1075},[107,3092,205],{"emptyLinePlaceholder":7},[107,3094,3095,3097,3099,3101,3103,3105],{"class":109,"line":1080},[107,3096,1019],{"class":124},[107,3098,1022],{"class":160},[107,3100,765],{"class":124},[107,3102,630],{"class":113},[107,3104,770],{"class":170},[107,3106,241],{"class":124},[107,3108,3109,3111,3113],{"class":109,"line":1091},[107,3110,627],{"class":124},[107,3112,630],{"class":113},[107,3114,787],{"class":124},[107,3116,3117,3119,3121],{"class":109,"line":1102},[107,3118,627],{"class":124},[107,3120,630],{"class":113},[107,3122,660],{"class":124},[107,3124,3125,3127,3129],{"class":109,"line":1111},[107,3126,627],{"class":124},[107,3128,630],{"class":113},[107,3130,669],{"class":124},[107,3132,3133,3135,3137],{"class":109,"line":1121},[107,3134,627],{"class":124},[107,3136,630],{"class":113},[107,3138,633],{"class":124},[107,3140,3141],{"class":109,"line":1134},[107,3142,1072],{"class":124},[107,3144,3145],{"class":109,"line":1141},[107,3146,205],{"emptyLinePlaceholder":7},[107,3148,3149,3151,3153,3155,3157,3159,3161],{"class":109,"line":1146},[107,3150,291],{"class":113},[107,3152,459],{"class":124},[107,3154,462],{"class":113},[107,3156,465],{"class":160},[107,3158,164],{"class":124},[107,3160,271],{"class":113},[107,3162,3163],{"class":124},"(q->mutex)) {\n",[107,3165,3166,3168,3170,3172],{"class":109,"line":1160},[107,3167,2916],{"class":113},[107,3169,845],{"class":317},[107,3171,1168],{"class":124},[107,3173,2926],{"class":131},[107,3175,3176,3178,3180],{"class":109,"line":1174},[107,3177,2931],{"class":124},[107,3179,2934],{"class":113},[107,3181,2036],{"class":124},[107,3183,3184,3186,3188],{"class":109,"line":1179},[107,3185,1094],{"class":124},[107,3187,707],{"class":113},[107,3189,1099],{"class":124},[107,3191,3192,3194,3196],{"class":109,"line":1191},[107,3193,866],{"class":124},[107,3195,707],{"class":113},[107,3197,871],{"class":124},[107,3199,3200,3202,3204],{"class":109,"line":1202},[107,3201,877],{"class":124},[107,3203,707],{"class":113},[107,3205,1118],{"class":124},[107,3207,3208,3210,3212],{"class":109,"line":1209},[107,3209,1217],{"class":124},[107,3211,707],{"class":113},[107,3213,1222],{"class":124},[107,3215,3216,3219,3221],{"class":109,"line":1214},[107,3217,3218],{"class":124},"    q->head ",[107,3220,707],{"class":113},[107,3222,3223],{"class":124}," next;\n",[107,3225,3226,3229],{"class":109,"line":1225},[107,3227,3228],{"class":160},"    g_slice_free",[107,3230,1264],{"class":124},[107,3232,3233,3235,3237,3239,3241,3243,3245],{"class":109,"line":1241},[107,3234,888],{"class":113},[107,3236,459],{"class":124},[107,3238,462],{"class":113},[107,3240,541],{"class":160},[107,3242,164],{"class":124},[107,3244,271],{"class":113},[107,3246,3055],{"class":124},[107,3248,3249,3251,3253,3255],{"class":109,"line":1248},[107,3250,1163],{"class":113},[107,3252,845],{"class":317},[107,3254,1168],{"class":124},[107,3256,2926],{"class":131},[107,3258,3259],{"class":109,"line":1253},[107,3260,910],{"class":124},[107,3262,3263],{"class":109,"line":1258},[107,3264,333],{"class":124},[107,3266,3267,3269],{"class":109,"line":1267},[107,3268,744],{"class":113},[107,3270,834],{"class":124},[107,3272,3273],{"class":109,"line":1274},[107,3274,339],{"class":124},[86,3276,3278],{"id":3277},"risk-assessment","Risk Assessment",[39,3280,3281,3282,3286],{},"The likelihood of having a race condition is low. Once the race condition occurs, the reading memory that has already been freed can lead to ",[1607,3283,3285],{"href":3284},"\u002Fsei-cert-c-coding-standard\u002Fback-matter\u002Fbb-definitions#BB.Definitions-abnormaltermination","abnormal program termination"," or unintended information disclosure.",[1300,3288,3289,3290,3289,3318],{},"\n  ",[3291,3292,3293,3294,3289],"thead",{},"\n    ",[1321,3295,3296,3297,3296,3300,3296,3303,3296,3306,3296,3309,3296,3312,3296,3315,3293],{},"\n      ",[1326,3298,3299],{},"Recommendation",[1326,3301,3302],{},"Severity",[1326,3304,3305],{},"Likelihood",[1326,3307,3308],{},"Detectable",[1326,3310,3311],{},"Repairable",[1326,3313,3314],{},"Priority",[1326,3316,3317],{},"Level",[1318,3319,3293,3320,3289],{},[1321,3321,3296,3322,3296,3325,3296,3328,3296,3331,3296,3334,3296,3336,3296,3343,3293],{},[1351,3323,3324],{},"CON09-C",[1351,3326,3327],{},"Medium",[1351,3329,3330],{},"Unlikely",[1351,3332,3333],{},"No",[1351,3335,3333],{},[1351,3337,3339],{"style":3338},"color: #27ae60;",[3340,3341,3342],"b",{},"P2",[1351,3344,3345],{"style":3338},[3340,3346,3347],{},"L3",[86,3349,3351],{"id":3350},"automated-detection","Automated Detection",[39,3353,3354],{},"Tool",[39,3356,3357],{},"Version",[39,3359,3360],{},"Checker",[39,3362,3363],{},"Description",[3365,3366,3368],"h3",{"id":3367},"related-vulnerabilities","Related Vulnerabilities",[39,3370,3371,3372,3376,3377,576],{},"Search for ",[1607,3373,3375],{"href":3374},"\u002Fsei-cert-c-coding-standard\u002Fback-matter\u002Fbb-definitions#BB.Definitions-vulnerability","vulnerabilities"," resulting from the violation of this rule on the ",[1607,3378,3382],{"href":3379,"rel":3380},"https:\u002F\u002Fwww.kb.cert.org\u002Fvulnotes\u002Fbymetric?searchview&query=FIELD+KEYWORDS+contains+CON09-C",[3381],"nofollow","CERT website",[86,3384,3386],{"id":3385},"bibliography","Bibliography",[1300,3388,3389,3397],{},[3291,3390,3391],{},[1321,3392,3393,3395],{},[1326,3394],{},[1326,3396],{},[1318,3398,3399,3416,3431],{},[1321,3400,3401,3409],{},[1351,3402,3403,3404,3408],{},"[ ",[1607,3405,3407],{"href":3406},"\u002Fsei-cert-c-coding-standard\u002Fback-matter\u002Faa-bibliography#AA.Bibliography-Apiki2006","Apiki 2006"," ]",[1351,3410,3411],{},[1607,3412,3415],{"href":3413,"rel":3414},"http:\u002F\u002Famddevcentral.com\u002FResources\u002Farchive\u002Fdocumentation\u002Farticles\u002FPages\u002Fdefault.aspx",[3381],"\"Lock-Free Programming on AMD Multi-Core System\"",[1321,3417,3418,3424],{},[1351,3419,3403,3420,3408],{},[1607,3421,3423],{"href":3422},"\u002Fsei-cert-c-coding-standard\u002Fback-matter\u002Faa-bibliography#AA.Bibliography-Asgher2000","Asgher 2000",[1351,3425,3426],{},[1607,3427,3430],{"href":3428,"rel":3429},"http:\u002F\u002Fwww.drdobbs.com\u002Fgo-parallel\u002Farticle\u002FshowArticle.jhtml;jsessionid=IBA5HITYQUKK1QE1GHRSKH4ATMY32JVN?articleID=219500200",[3381],"\"Practical Lock-Free Buffers\"",[1321,3432,3433,3437],{},[1351,3434,3403,3435,3408],{},[1607,3436,1610],{"href":1609},[1351,3438,3439],{},"\"Hazard Pointers\"",[3441,3442],"hr",{},[39,3444,3445,3452,3453,3452,3459],{},[1607,3446,3448],{"href":3447},"\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fconcurrency-con\u002Fcon08-c",[3449,3450],"img",{"src":3451},"\u002Fattachments\u002F87152044\u002F88034188.png"," ",[1607,3454,3456],{"href":3455},"\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fconcurrency-con\u002F",[3449,3457],{"src":3458},"\u002Fattachments\u002F87152044\u002F88034190.png",[1607,3460,3462],{"href":3461},"\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fdeclarations-and-initialization-dcl\u002F",[3449,3463],{"src":3464},"\u002Fattachments\u002F87152044\u002F88034189.png",[3466,3467,3468],"style",{},"html pre.shiki code .sC2Qs, html code.shiki .sC2Qs{--shiki-default:#D73A49;--shiki-dark:#F97583;--shiki-sepia:#F92672}html pre.shiki code .sstjo, html code.shiki .sstjo{--shiki-default:#032F62;--shiki-dark:#9ECBFF;--shiki-sepia:#E6DB74}html pre.shiki code .sMOD_, html code.shiki .sMOD_{--shiki-default:#24292E;--shiki-dark:#E1E4E8;--shiki-sepia:#F8F8F2}html pre.shiki code .s8-w5, html code.shiki .s8-w5{--shiki-default:#6A737D;--shiki-dark:#6A737D;--shiki-sepia:#88846F}html pre.shiki code .sq6CD, html code.shiki .sq6CD{--shiki-default:#D73A49;--shiki-default-font-style:inherit;--shiki-dark:#F97583;--shiki-dark-font-style:inherit;--shiki-sepia:#66D9EF;--shiki-sepia-font-style:italic}html pre.shiki code .srTi1, html code.shiki .srTi1{--shiki-default:#6F42C1;--shiki-dark:#B392F0;--shiki-sepia:#A6E22E}html pre.shiki code .sTHNf, html code.shiki .sTHNf{--shiki-default:#E36209;--shiki-default-font-style:inherit;--shiki-dark:#FFAB70;--shiki-dark-font-style:inherit;--shiki-sepia:#FD971F;--shiki-sepia-font-style:italic}html pre.shiki code .sOrwc, html code.shiki .sOrwc{--shiki-default:#E36209;--shiki-dark:#FFAB70;--shiki-sepia:#F8F8F2}html pre.shiki code .s7F3e, html code.shiki .s7F3e{--shiki-default:#005CC5;--shiki-dark:#79B8FF;--shiki-sepia:#AE81FF}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html .sepia .shiki span {color: var(--shiki-sepia);background: var(--shiki-sepia-bg);font-style: var(--shiki-sepia-font-style);font-weight: var(--shiki-sepia-font-weight);text-decoration: var(--shiki-sepia-text-decoration);}html.sepia .shiki span {color: var(--shiki-sepia);background: var(--shiki-sepia-bg);font-style: var(--shiki-sepia-font-style);font-weight: var(--shiki-sepia-font-weight);text-decoration: var(--shiki-sepia-text-decoration);}html pre.shiki code .s-m8C, html code.shiki .s-m8C{--shiki-default:#005CC5;--shiki-default-font-style:inherit;--shiki-dark:#79B8FF;--shiki-dark-font-style:inherit;--shiki-sepia:#66D9EF;--shiki-sepia-font-style:italic}",{"title":103,"searchDepth":121,"depth":121,"links":3470},[3471,3472,3473,3474,3475,3476,3477,3480],{"id":88,"depth":121,"text":89},{"id":372,"depth":121,"text":373},{"id":564,"depth":121,"text":565},{"id":1601,"depth":121,"text":1602},{"id":2662,"depth":121,"text":2663},{"id":3277,"depth":121,"text":3278},{"id":3350,"depth":121,"text":3351,"children":3478},[3479],{"id":3367,"depth":128,"text":3368},{"id":3385,"depth":121,"text":3386},"md",{"tags":3483},[3484,3485,3486,3487],"recommendation","android-unknown","review","con","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fconcurrency-con\u002Fcon09-c",{"title":30,"description":41},"4.sei-cert-c-coding-standard\u002F08.recommendations\u002F05.concurrency-con\u002F10.con09-c","sHDDI3CD_aijTjoD_OT0p-Y8WbKXW9MJ81IDwf-9mYM",[3493,3496],{"title":3494,"path":3447,"stem":3495,"children":-1},"CON08-C. Do not assume that a group of calls to independently atomic methods is atomic","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F05.concurrency-con\u002F09.con08-c",{"title":3497,"path":3498,"stem":3499,"children":-1},"Declarations and Initialization (DCL)","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fdeclarations-and-initialization-dcl","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F06.declarations-and-initialization-dcl\u002F01.index",[3501],{"title":3502,"path":3503,"stem":3504,"children":3505},"SEI CERT C Coding Standard","\u002Fsei-cert-c-coding-standard","4.sei-cert-c-coding-standard\u002F01.index",[3506,3507,3579,4168,4465,4479,4483,4487,4491,5298],{"title":3502,"path":3503,"stem":3504},{"title":3508,"path":3509,"stem":3510,"children":3511},"Front Matter","\u002Fsei-cert-c-coding-standard\u002Ffront-matter","4.sei-cert-c-coding-standard\u002F02.front-matter\u002F1.index",[3512,3513],{"title":3508,"path":3509,"stem":3510},{"title":3514,"path":3515,"stem":3516,"children":3517},"Introduction","\u002Fsei-cert-c-coding-standard\u002Ffront-matter\u002Fintroduction","4.sei-cert-c-coding-standard\u002F02.front-matter\u002F2.introduction\u002F01.index",[3518,3519,3523,3527,3531,3535,3539,3543,3547,3551,3555,3559,3563,3567,3571,3575],{"title":3514,"path":3515,"stem":3516},{"title":3520,"path":3521,"stem":3522},"Scope","\u002Fsei-cert-c-coding-standard\u002Ffront-matter\u002Fintroduction\u002Fscope","4.sei-cert-c-coding-standard\u002F02.front-matter\u002F2.introduction\u002F01.scope",{"title":3524,"path":3525,"stem":3526},"Audience","\u002Fsei-cert-c-coding-standard\u002Ffront-matter\u002Fintroduction\u002Faudience","4.sei-cert-c-coding-standard\u002F02.front-matter\u002F2.introduction\u002F02.audience",{"title":3528,"path":3529,"stem":3530},"How this Coding Standard is Organized","\u002Fsei-cert-c-coding-standard\u002Ffront-matter\u002Fintroduction\u002Fhow-this-coding-standard-is-organized","4.sei-cert-c-coding-standard\u002F02.front-matter\u002F2.introduction\u002F03.how-this-coding-standard-is-organized",{"title":3532,"path":3533,"stem":3534},"History","\u002Fsei-cert-c-coding-standard\u002Ffront-matter\u002Fintroduction\u002Fhistory","4.sei-cert-c-coding-standard\u002F02.front-matter\u002F2.introduction\u002F04.history",{"title":3536,"path":3537,"stem":3538},"ISO\u002FIEC TS 17961 C Secure Coding Rules","\u002Fsei-cert-c-coding-standard\u002Ffront-matter\u002Fintroduction\u002Fisoiec-ts-17961-c-secure-coding-rules","4.sei-cert-c-coding-standard\u002F02.front-matter\u002F2.introduction\u002F05.isoiec-ts-17961-c-secure-coding-rules",{"title":3540,"path":3541,"stem":3542},"Tool Selection and Validation","\u002Fsei-cert-c-coding-standard\u002Ffront-matter\u002Fintroduction\u002Ftool-selection-and-validation","4.sei-cert-c-coding-standard\u002F02.front-matter\u002F2.introduction\u002F06.tool-selection-and-validation",{"title":3544,"path":3545,"stem":3546},"Taint Analysis","\u002Fsei-cert-c-coding-standard\u002Ffront-matter\u002Fintroduction\u002Ftaint-analysis","4.sei-cert-c-coding-standard\u002F02.front-matter\u002F2.introduction\u002F07.taint-analysis",{"title":3548,"path":3549,"stem":3550},"Rules versus Recommendations","\u002Fsei-cert-c-coding-standard\u002Ffront-matter\u002Fintroduction\u002Frules-versus-recommendations","4.sei-cert-c-coding-standard\u002F02.front-matter\u002F2.introduction\u002F08.rules-versus-recommendations",{"title":3552,"path":3553,"stem":3554},"Conformance Testing","\u002Fsei-cert-c-coding-standard\u002Ffront-matter\u002Fintroduction\u002Fconformance-testing","4.sei-cert-c-coding-standard\u002F02.front-matter\u002F2.introduction\u002F09.conformance-testing",{"title":3556,"path":3557,"stem":3558},"Development Process","\u002Fsei-cert-c-coding-standard\u002Ffront-matter\u002Fintroduction\u002Fdevelopment-process","4.sei-cert-c-coding-standard\u002F02.front-matter\u002F2.introduction\u002F10.development-process",{"title":3560,"path":3561,"stem":3562},"Usage","\u002Fsei-cert-c-coding-standard\u002Ffront-matter\u002Fintroduction\u002Fusage","4.sei-cert-c-coding-standard\u002F02.front-matter\u002F2.introduction\u002F11.usage",{"title":3564,"path":3565,"stem":3566},"System Qualities","\u002Fsei-cert-c-coding-standard\u002Ffront-matter\u002Fintroduction\u002Fsystem-qualities","4.sei-cert-c-coding-standard\u002F02.front-matter\u002F2.introduction\u002F12.system-qualities",{"title":3568,"path":3569,"stem":3570},"Automatically Generated Code","\u002Fsei-cert-c-coding-standard\u002Ffront-matter\u002Fintroduction\u002Fautomatically-generated-code","4.sei-cert-c-coding-standard\u002F02.front-matter\u002F2.introduction\u002F13.automatically-generated-code",{"title":3572,"path":3573,"stem":3574},"Government Regulations","\u002Fsei-cert-c-coding-standard\u002Ffront-matter\u002Fintroduction\u002Fgovernment-regulations","4.sei-cert-c-coding-standard\u002F02.front-matter\u002F2.introduction\u002F14.government-regulations",{"title":3576,"path":3577,"stem":3578},"Acknowledgments","\u002Fsei-cert-c-coding-standard\u002Ffront-matter\u002Fintroduction\u002Facknowledgments","4.sei-cert-c-coding-standard\u002F02.front-matter\u002F2.introduction\u002F15.acknowledgments",{"title":3580,"path":3581,"stem":3582,"children":3583},"Rules","\u002Fsei-cert-c-coding-standard\u002Frules","4.sei-cert-c-coding-standard\u002F03.rules\u002F01.index",[3584,3585,3589,3619,3649,3711,3748,3774,3796,3862,3888,3946,3980,4010,4020,4058,4128,4146],{"title":3580,"path":3581,"stem":3582},{"title":3586,"path":3587,"stem":3588},"Application Programming Interfaces (API)","\u002Fsei-cert-c-coding-standard\u002Frules\u002Fapplication-programming-interfaces-api","4.sei-cert-c-coding-standard\u002F03.rules\u002F02.application-programming-interfaces-api",{"title":3590,"path":3591,"stem":3592,"children":3593},"Arrays (ARR)","\u002Fsei-cert-c-coding-standard\u002Frules\u002Farrays-arr","4.sei-cert-c-coding-standard\u002F03.rules\u002F03.arrays-arr\u002F1.index",[3594,3595,3599,3603,3607,3611,3615],{"title":3590,"path":3591,"stem":3592},{"title":3596,"path":3597,"stem":3598},"ARR30-C. Do not form or use out-of-bounds pointers or array subscripts","\u002Fsei-cert-c-coding-standard\u002Frules\u002Farrays-arr\u002Farr30-c","4.sei-cert-c-coding-standard\u002F03.rules\u002F03.arrays-arr\u002F2.arr30-c",{"title":3600,"path":3601,"stem":3602},"ARR32-C. Ensure size arguments for variable length arrays are in a valid range","\u002Fsei-cert-c-coding-standard\u002Frules\u002Farrays-arr\u002Farr32-c","4.sei-cert-c-coding-standard\u002F03.rules\u002F03.arrays-arr\u002F3.arr32-c",{"title":3604,"path":3605,"stem":3606},"ARR36-C. Do not subtract or compare two pointers that do not refer to the same array","\u002Fsei-cert-c-coding-standard\u002Frules\u002Farrays-arr\u002Farr36-c","4.sei-cert-c-coding-standard\u002F03.rules\u002F03.arrays-arr\u002F4.arr36-c",{"title":3608,"path":3609,"stem":3610},"ARR37-C. Do not add or subtract an integer to a pointer to a non-array object","\u002Fsei-cert-c-coding-standard\u002Frules\u002Farrays-arr\u002Farr37-c","4.sei-cert-c-coding-standard\u002F03.rules\u002F03.arrays-arr\u002F5.arr37-c",{"title":3612,"path":3613,"stem":3614},"ARR38-C. Guarantee that library functions do not form invalid pointers","\u002Fsei-cert-c-coding-standard\u002Frules\u002Farrays-arr\u002Farr38-c","4.sei-cert-c-coding-standard\u002F03.rules\u002F03.arrays-arr\u002F6.arr38-c",{"title":3616,"path":3617,"stem":3618},"ARR39-C. Do not add or subtract a scaled integer to a pointer","\u002Fsei-cert-c-coding-standard\u002Frules\u002Farrays-arr\u002Farr39-c","4.sei-cert-c-coding-standard\u002F03.rules\u002F03.arrays-arr\u002F7.arr39-c",{"title":3620,"path":3621,"stem":3622,"children":3623},"Characters and Strings (STR)","\u002Fsei-cert-c-coding-standard\u002Frules\u002Fcharacters-and-strings-str","4.sei-cert-c-coding-standard\u002F03.rules\u002F04.characters-and-strings-str\u002F1.index",[3624,3625,3629,3633,3637,3641,3645],{"title":3620,"path":3621,"stem":3622},{"title":3626,"path":3627,"stem":3628},"STR30-C. Do not attempt to modify string literals","\u002Fsei-cert-c-coding-standard\u002Frules\u002Fcharacters-and-strings-str\u002Fstr30-c","4.sei-cert-c-coding-standard\u002F03.rules\u002F04.characters-and-strings-str\u002F2.str30-c",{"title":3630,"path":3631,"stem":3632},"STR31-C. Guarantee that storage for strings has sufficient space for character data and the null terminator","\u002Fsei-cert-c-coding-standard\u002Frules\u002Fcharacters-and-strings-str\u002Fstr31-c","4.sei-cert-c-coding-standard\u002F03.rules\u002F04.characters-and-strings-str\u002F3.str31-c",{"title":3634,"path":3635,"stem":3636},"STR32-C. Do not pass a non-null-terminated character sequence to a library function that expects a string","\u002Fsei-cert-c-coding-standard\u002Frules\u002Fcharacters-and-strings-str\u002Fstr32-c","4.sei-cert-c-coding-standard\u002F03.rules\u002F04.characters-and-strings-str\u002F4.str32-c",{"title":3638,"path":3639,"stem":3640},"STR34-C. Cast characters to unsigned char before converting to larger integer sizes","\u002Fsei-cert-c-coding-standard\u002Frules\u002Fcharacters-and-strings-str\u002Fstr34-c","4.sei-cert-c-coding-standard\u002F03.rules\u002F04.characters-and-strings-str\u002F5.str34-c",{"title":3642,"path":3643,"stem":3644},"STR37-C. Arguments to character-handling functions must be representable as an unsigned char","\u002Fsei-cert-c-coding-standard\u002Frules\u002Fcharacters-and-strings-str\u002Fstr37-c","4.sei-cert-c-coding-standard\u002F03.rules\u002F04.characters-and-strings-str\u002F6.str37-c",{"title":3646,"path":3647,"stem":3648},"STR38-C. Do not confuse narrow and wide character strings and functions","\u002Fsei-cert-c-coding-standard\u002Frules\u002Fcharacters-and-strings-str\u002Fstr38-c","4.sei-cert-c-coding-standard\u002F03.rules\u002F04.characters-and-strings-str\u002F7.str38-c",{"title":3650,"path":3651,"stem":3652,"children":3653},"Concurrency (CON)","\u002Fsei-cert-c-coding-standard\u002Frules\u002Fconcurrency-con","4.sei-cert-c-coding-standard\u002F03.rules\u002F05.concurrency-con\u002F01.index",[3654,3655,3659,3663,3667,3671,3675,3679,3683,3687,3691,3695,3699,3703,3707],{"title":3650,"path":3651,"stem":3652},{"title":3656,"path":3657,"stem":3658},"CON30-C. Clean up thread-specific storage","\u002Fsei-cert-c-coding-standard\u002Frules\u002Fconcurrency-con\u002Fcon30-c","4.sei-cert-c-coding-standard\u002F03.rules\u002F05.concurrency-con\u002F02.con30-c",{"title":3660,"path":3661,"stem":3662},"CON31-C. Do not destroy a mutex while it is locked","\u002Fsei-cert-c-coding-standard\u002Frules\u002Fconcurrency-con\u002Fcon31-c","4.sei-cert-c-coding-standard\u002F03.rules\u002F05.concurrency-con\u002F03.con31-c",{"title":3664,"path":3665,"stem":3666},"CON32-C. Prevent data races when accessing bit-fields from multiple threads","\u002Fsei-cert-c-coding-standard\u002Frules\u002Fconcurrency-con\u002Fcon32-c","4.sei-cert-c-coding-standard\u002F03.rules\u002F05.concurrency-con\u002F04.con32-c",{"title":3668,"path":3669,"stem":3670},"CON33-C. Avoid race conditions when using library functions","\u002Fsei-cert-c-coding-standard\u002Frules\u002Fconcurrency-con\u002Fcon33-c","4.sei-cert-c-coding-standard\u002F03.rules\u002F05.concurrency-con\u002F05.con33-c",{"title":3672,"path":3673,"stem":3674},"CON34-C. Declare objects shared between threads with appropriate storage durations","\u002Fsei-cert-c-coding-standard\u002Frules\u002Fconcurrency-con\u002Fcon34-c","4.sei-cert-c-coding-standard\u002F03.rules\u002F05.concurrency-con\u002F06.con34-c",{"title":3676,"path":3677,"stem":3678},"CON35-C. Avoid deadlock by locking in a predefined order","\u002Fsei-cert-c-coding-standard\u002Frules\u002Fconcurrency-con\u002Fcon35-c","4.sei-cert-c-coding-standard\u002F03.rules\u002F05.concurrency-con\u002F07.con35-c",{"title":3680,"path":3681,"stem":3682},"CON36-C. Wrap functions that can spuriously wake up in a loop","\u002Fsei-cert-c-coding-standard\u002Frules\u002Fconcurrency-con\u002Fcon36-c","4.sei-cert-c-coding-standard\u002F03.rules\u002F05.concurrency-con\u002F08.con36-c",{"title":3684,"path":3685,"stem":3686},"CON37-C. Do not call signal() in a multithreaded program","\u002Fsei-cert-c-coding-standard\u002Frules\u002Fconcurrency-con\u002Fcon37-c","4.sei-cert-c-coding-standard\u002F03.rules\u002F05.concurrency-con\u002F09.con37-c",{"title":3688,"path":3689,"stem":3690},"CON38-C. Preserve thread safety and liveness when using condition variables","\u002Fsei-cert-c-coding-standard\u002Frules\u002Fconcurrency-con\u002Fcon38-c","4.sei-cert-c-coding-standard\u002F03.rules\u002F05.concurrency-con\u002F10.con38-c",{"title":3692,"path":3693,"stem":3694},"CON39-C. Do not join or detach a thread that was previously joined or detached","\u002Fsei-cert-c-coding-standard\u002Frules\u002Fconcurrency-con\u002Fcon39-c","4.sei-cert-c-coding-standard\u002F03.rules\u002F05.concurrency-con\u002F11.con39-c",{"title":3696,"path":3697,"stem":3698},"CON40-C. Do not refer to an atomic variable twice in an expression","\u002Fsei-cert-c-coding-standard\u002Frules\u002Fconcurrency-con\u002Fcon40-c","4.sei-cert-c-coding-standard\u002F03.rules\u002F05.concurrency-con\u002F12.con40-c",{"title":3700,"path":3701,"stem":3702},"CON41-C. Wrap functions that can fail spuriously in a loop","\u002Fsei-cert-c-coding-standard\u002Frules\u002Fconcurrency-con\u002Fcon41-c","4.sei-cert-c-coding-standard\u002F03.rules\u002F05.concurrency-con\u002F13.con41-c",{"title":3704,"path":3705,"stem":3706},"CON42-C. Don't allow attackers to influence environment variables that control concurrency parameters","\u002Fsei-cert-c-coding-standard\u002Frules\u002Fconcurrency-con\u002Fcon42-c","4.sei-cert-c-coding-standard\u002F03.rules\u002F05.concurrency-con\u002F14.con42-c",{"title":3708,"path":3709,"stem":3710},"CON43-C. Do not allow data races in multithreaded code","\u002Fsei-cert-c-coding-standard\u002Frules\u002Fconcurrency-con\u002Fcon43-c","4.sei-cert-c-coding-standard\u002F03.rules\u002F05.concurrency-con\u002F15.con43-c",{"title":3497,"path":3712,"stem":3713,"children":3714},"\u002Fsei-cert-c-coding-standard\u002Frules\u002Fdeclarations-and-initialization-dcl","4.sei-cert-c-coding-standard\u002F03.rules\u002F06.declarations-and-initialization-dcl\u002F1.index",[3715,3716,3720,3724,3728,3732,3736,3740,3744],{"title":3497,"path":3712,"stem":3713},{"title":3717,"path":3718,"stem":3719},"DCL30-C. Declare objects with appropriate storage durations","\u002Fsei-cert-c-coding-standard\u002Frules\u002Fdeclarations-and-initialization-dcl\u002Fdcl30-c","4.sei-cert-c-coding-standard\u002F03.rules\u002F06.declarations-and-initialization-dcl\u002F2.dcl30-c",{"title":3721,"path":3722,"stem":3723},"DCL31-C. Declare identifiers before using them","\u002Fsei-cert-c-coding-standard\u002Frules\u002Fdeclarations-and-initialization-dcl\u002Fdcl31-c","4.sei-cert-c-coding-standard\u002F03.rules\u002F06.declarations-and-initialization-dcl\u002F3.dcl31-c",{"title":3725,"path":3726,"stem":3727},"DCL36-C. Do not declare an identifier with conflicting linkage classifications","\u002Fsei-cert-c-coding-standard\u002Frules\u002Fdeclarations-and-initialization-dcl\u002Fdcl36-c","4.sei-cert-c-coding-standard\u002F03.rules\u002F06.declarations-and-initialization-dcl\u002F4.dcl36-c",{"title":3729,"path":3730,"stem":3731},"DCL37-C. Do not declare or define a reserved identifier","\u002Fsei-cert-c-coding-standard\u002Frules\u002Fdeclarations-and-initialization-dcl\u002Fdcl37-c","4.sei-cert-c-coding-standard\u002F03.rules\u002F06.declarations-and-initialization-dcl\u002F5.dcl37-c",{"title":3733,"path":3734,"stem":3735},"DCL38-C. Use the correct syntax when declaring a flexible array member","\u002Fsei-cert-c-coding-standard\u002Frules\u002Fdeclarations-and-initialization-dcl\u002Fdcl38-c","4.sei-cert-c-coding-standard\u002F03.rules\u002F06.declarations-and-initialization-dcl\u002F6.dcl38-c",{"title":3737,"path":3738,"stem":3739},"DCL39-C. Avoid information leakage when passing a structure across a trust boundary","\u002Fsei-cert-c-coding-standard\u002Frules\u002Fdeclarations-and-initialization-dcl\u002Fdcl39-c","4.sei-cert-c-coding-standard\u002F03.rules\u002F06.declarations-and-initialization-dcl\u002F7.dcl39-c",{"title":3741,"path":3742,"stem":3743},"DCL40-C. Do not create incompatible declarations of the same function or object","\u002Fsei-cert-c-coding-standard\u002Frules\u002Fdeclarations-and-initialization-dcl\u002Fdcl40-c","4.sei-cert-c-coding-standard\u002F03.rules\u002F06.declarations-and-initialization-dcl\u002F8.dcl40-c",{"title":3745,"path":3746,"stem":3747},"DCL41-C. Do not declare variables inside a switch statement before the first case label","\u002Fsei-cert-c-coding-standard\u002Frules\u002Fdeclarations-and-initialization-dcl\u002Fdcl41-c","4.sei-cert-c-coding-standard\u002F03.rules\u002F06.declarations-and-initialization-dcl\u002F9.dcl41-c",{"title":3749,"path":3750,"stem":3751,"children":3752},"Environment (ENV)","\u002Fsei-cert-c-coding-standard\u002Frules\u002Fenvironment-env","4.sei-cert-c-coding-standard\u002F03.rules\u002F07.environment-env\u002F1.index",[3753,3754,3758,3762,3766,3770],{"title":3749,"path":3750,"stem":3751},{"title":3755,"path":3756,"stem":3757},"ENV30-C. Do not modify the object referenced by the return value of certain functions","\u002Fsei-cert-c-coding-standard\u002Frules\u002Fenvironment-env\u002Fenv30-c","4.sei-cert-c-coding-standard\u002F03.rules\u002F07.environment-env\u002F2.env30-c",{"title":3759,"path":3760,"stem":3761},"ENV31-C. Do not rely on an environment pointer following an operation that may invalidate it","\u002Fsei-cert-c-coding-standard\u002Frules\u002Fenvironment-env\u002Fenv31-c","4.sei-cert-c-coding-standard\u002F03.rules\u002F07.environment-env\u002F3.env31-c",{"title":3763,"path":3764,"stem":3765},"ENV32-C. All exit handlers must return normally","\u002Fsei-cert-c-coding-standard\u002Frules\u002Fenvironment-env\u002Fenv32-c","4.sei-cert-c-coding-standard\u002F03.rules\u002F07.environment-env\u002F4.env32-c",{"title":3767,"path":3768,"stem":3769},"ENV33-C. Do not call system()","\u002Fsei-cert-c-coding-standard\u002Frules\u002Fenvironment-env\u002Fenv33-c","4.sei-cert-c-coding-standard\u002F03.rules\u002F07.environment-env\u002F5.env33-c",{"title":3771,"path":3772,"stem":3773},"ENV34-C. Do not store pointers returned by certain functions","\u002Fsei-cert-c-coding-standard\u002Frules\u002Fenvironment-env\u002Fenv34-c","4.sei-cert-c-coding-standard\u002F03.rules\u002F07.environment-env\u002F6.env34-c",{"title":3775,"path":3776,"stem":3777,"children":3778},"Error Handling (ERR)","\u002Fsei-cert-c-coding-standard\u002Frules\u002Ferror-handling-err","4.sei-cert-c-coding-standard\u002F03.rules\u002F08.error-handling-err\u002F1.index",[3779,3780,3784,3788,3792],{"title":3775,"path":3776,"stem":3777},{"title":3781,"path":3782,"stem":3783},"ERR30-C. Take care when reading errno","\u002Fsei-cert-c-coding-standard\u002Frules\u002Ferror-handling-err\u002Ferr30-c","4.sei-cert-c-coding-standard\u002F03.rules\u002F08.error-handling-err\u002F2.err30-c",{"title":3785,"path":3786,"stem":3787},"ERR32-C. Do not rely on indeterminate values of errno","\u002Fsei-cert-c-coding-standard\u002Frules\u002Ferror-handling-err\u002Ferr32-c","4.sei-cert-c-coding-standard\u002F03.rules\u002F08.error-handling-err\u002F3.err32-c",{"title":3789,"path":3790,"stem":3791},"ERR33-C. Detect and handle standard library errors","\u002Fsei-cert-c-coding-standard\u002Frules\u002Ferror-handling-err\u002Ferr33-c","4.sei-cert-c-coding-standard\u002F03.rules\u002F08.error-handling-err\u002F4.err33-c",{"title":3793,"path":3794,"stem":3795},"ERR34-C. Detect errors when converting a string to a number","\u002Fsei-cert-c-coding-standard\u002Frules\u002Ferror-handling-err\u002Ferr34-c","4.sei-cert-c-coding-standard\u002F03.rules\u002F08.error-handling-err\u002F5.err34-c",{"title":3797,"path":3798,"stem":3799,"children":3800},"Expressions (EXP)","\u002Fsei-cert-c-coding-standard\u002Frules\u002Fexpressions-exp","4.sei-cert-c-coding-standard\u002F03.rules\u002F09.expressions-exp\u002F01.index",[3801,3802,3806,3810,3814,3818,3822,3826,3830,3834,3838,3842,3846,3850,3854,3858],{"title":3797,"path":3798,"stem":3799},{"title":3803,"path":3804,"stem":3805},"EXP30-C. Do not depend on the order of evaluation for side effects","\u002Fsei-cert-c-coding-standard\u002Frules\u002Fexpressions-exp\u002Fexp30-c","4.sei-cert-c-coding-standard\u002F03.rules\u002F09.expressions-exp\u002F02.exp30-c",{"title":3807,"path":3808,"stem":3809},"EXP32-C. Do not access a volatile object through a nonvolatile reference","\u002Fsei-cert-c-coding-standard\u002Frules\u002Fexpressions-exp\u002Fexp32-c","4.sei-cert-c-coding-standard\u002F03.rules\u002F09.expressions-exp\u002F03.exp32-c",{"title":3811,"path":3812,"stem":3813},"EXP33-C. Do not read uninitialized memory","\u002Fsei-cert-c-coding-standard\u002Frules\u002Fexpressions-exp\u002Fexp33-c","4.sei-cert-c-coding-standard\u002F03.rules\u002F09.expressions-exp\u002F04.exp33-c",{"title":3815,"path":3816,"stem":3817},"EXP34-C. Do not dereference null pointers","\u002Fsei-cert-c-coding-standard\u002Frules\u002Fexpressions-exp\u002Fexp34-c","4.sei-cert-c-coding-standard\u002F03.rules\u002F09.expressions-exp\u002F05.exp34-c",{"title":3819,"path":3820,"stem":3821},"EXP35-C. Do not modify objects with temporary lifetime","\u002Fsei-cert-c-coding-standard\u002Frules\u002Fexpressions-exp\u002Fexp35-c","4.sei-cert-c-coding-standard\u002F03.rules\u002F09.expressions-exp\u002F06.exp35-c",{"title":3823,"path":3824,"stem":3825},"EXP36-C. Do not cast pointers into more strictly aligned pointer types","\u002Fsei-cert-c-coding-standard\u002Frules\u002Fexpressions-exp\u002Fexp36-c","4.sei-cert-c-coding-standard\u002F03.rules\u002F09.expressions-exp\u002F07.exp36-c",{"title":3827,"path":3828,"stem":3829},"EXP37-C. Call functions with the correct number and type of arguments","\u002Fsei-cert-c-coding-standard\u002Frules\u002Fexpressions-exp\u002Fexp37-c","4.sei-cert-c-coding-standard\u002F03.rules\u002F09.expressions-exp\u002F08.exp37-c",{"title":3831,"path":3832,"stem":3833},"EXP39-C. Do not access a variable through a pointer of an incompatible type","\u002Fsei-cert-c-coding-standard\u002Frules\u002Fexpressions-exp\u002Fexp39-c","4.sei-cert-c-coding-standard\u002F03.rules\u002F09.expressions-exp\u002F09.exp39-c",{"title":3835,"path":3836,"stem":3837},"EXP40-C. Do not modify constant objects","\u002Fsei-cert-c-coding-standard\u002Frules\u002Fexpressions-exp\u002Fexp40-c","4.sei-cert-c-coding-standard\u002F03.rules\u002F09.expressions-exp\u002F10.exp40-c",{"title":3839,"path":3840,"stem":3841},"EXP42-C. Do not compare padding data","\u002Fsei-cert-c-coding-standard\u002Frules\u002Fexpressions-exp\u002Fexp42-c","4.sei-cert-c-coding-standard\u002F03.rules\u002F09.expressions-exp\u002F11.exp42-c",{"title":3843,"path":3844,"stem":3845},"EXP43-C. Avoid undefined behavior when using restrict-qualified pointers","\u002Fsei-cert-c-coding-standard\u002Frules\u002Fexpressions-exp\u002Fexp43-c","4.sei-cert-c-coding-standard\u002F03.rules\u002F09.expressions-exp\u002F12.exp43-c",{"title":3847,"path":3848,"stem":3849},"EXP44-C. Do not rely on side effects in operands to sizeof, _Alignof, or _Generic","\u002Fsei-cert-c-coding-standard\u002Frules\u002Fexpressions-exp\u002Fexp44-c","4.sei-cert-c-coding-standard\u002F03.rules\u002F09.expressions-exp\u002F13.exp44-c",{"title":3851,"path":3852,"stem":3853},"EXP45-C. Do not perform assignments in selection statements","\u002Fsei-cert-c-coding-standard\u002Frules\u002Fexpressions-exp\u002Fexp45-c","4.sei-cert-c-coding-standard\u002F03.rules\u002F09.expressions-exp\u002F14.exp45-c",{"title":3855,"path":3856,"stem":3857},"EXP46-C. Do not use a bitwise operator with a Boolean-like operand","\u002Fsei-cert-c-coding-standard\u002Frules\u002Fexpressions-exp\u002Fexp46-c","4.sei-cert-c-coding-standard\u002F03.rules\u002F09.expressions-exp\u002F15.exp46-c",{"title":3859,"path":3860,"stem":3861},"EXP47-C. Do not call va_arg with an argument of the incorrect type","\u002Fsei-cert-c-coding-standard\u002Frules\u002Fexpressions-exp\u002Fexp47-c","4.sei-cert-c-coding-standard\u002F03.rules\u002F09.expressions-exp\u002F16.exp47-c",{"title":3863,"path":3864,"stem":3865,"children":3866},"Floating Point (FLP)","\u002Fsei-cert-c-coding-standard\u002Frules\u002Ffloating-point-flp","4.sei-cert-c-coding-standard\u002F03.rules\u002F10.floating-point-flp\u002F1.index",[3867,3868,3872,3876,3880,3884],{"title":3863,"path":3864,"stem":3865},{"title":3869,"path":3870,"stem":3871},"FLP30-C. Do not use floating-point variables as loop counters","\u002Fsei-cert-c-coding-standard\u002Frules\u002Ffloating-point-flp\u002Fflp30-c","4.sei-cert-c-coding-standard\u002F03.rules\u002F10.floating-point-flp\u002F2.flp30-c",{"title":3873,"path":3874,"stem":3875},"FLP32-C. Prevent or detect domain and range errors in math functions","\u002Fsei-cert-c-coding-standard\u002Frules\u002Ffloating-point-flp\u002Fflp32-c","4.sei-cert-c-coding-standard\u002F03.rules\u002F10.floating-point-flp\u002F3.flp32-c",{"title":3877,"path":3878,"stem":3879},"FLP34-C. Ensure that floating-point conversions are within range of the new type","\u002Fsei-cert-c-coding-standard\u002Frules\u002Ffloating-point-flp\u002Fflp34-c","4.sei-cert-c-coding-standard\u002F03.rules\u002F10.floating-point-flp\u002F4.flp34-c",{"title":3881,"path":3882,"stem":3883},"FLP36-C. Preserve precision when converting integral values to floating-point type","\u002Fsei-cert-c-coding-standard\u002Frules\u002Ffloating-point-flp\u002Fflp36-c","4.sei-cert-c-coding-standard\u002F03.rules\u002F10.floating-point-flp\u002F5.flp36-c",{"title":3885,"path":3886,"stem":3887},"FLP37-C. Do not use object representations to compare floating-point values","\u002Fsei-cert-c-coding-standard\u002Frules\u002Ffloating-point-flp\u002Fflp37-c","4.sei-cert-c-coding-standard\u002F03.rules\u002F10.floating-point-flp\u002F6.flp37-c",{"title":3889,"path":3890,"stem":3891,"children":3892},"Input Output (FIO)","\u002Fsei-cert-c-coding-standard\u002Frules\u002Finput-output-fio","4.sei-cert-c-coding-standard\u002F03.rules\u002F11.input-output-fio\u002F01.index",[3893,3894,3898,3902,3906,3910,3914,3918,3922,3926,3930,3934,3938,3942],{"title":3889,"path":3890,"stem":3891},{"title":3895,"path":3896,"stem":3897},"FIO30-C. Exclude user input from format strings","\u002Fsei-cert-c-coding-standard\u002Frules\u002Finput-output-fio\u002Ffio30-c","4.sei-cert-c-coding-standard\u002F03.rules\u002F11.input-output-fio\u002F02.fio30-c",{"title":3899,"path":3900,"stem":3901},"FIO32-C. Do not perform operations on devices that are only appropriate for files","\u002Fsei-cert-c-coding-standard\u002Frules\u002Finput-output-fio\u002Ffio32-c","4.sei-cert-c-coding-standard\u002F03.rules\u002F11.input-output-fio\u002F03.fio32-c",{"title":3903,"path":3904,"stem":3905},"FIO34-C. Distinguish between characters read from a file and EOF or WEOF","\u002Fsei-cert-c-coding-standard\u002Frules\u002Finput-output-fio\u002Ffio34-c","4.sei-cert-c-coding-standard\u002F03.rules\u002F11.input-output-fio\u002F04.fio34-c",{"title":3907,"path":3908,"stem":3909},"FIO37-C. Do not assume that fgets() or fgetws() returns a nonempty string when successful","\u002Fsei-cert-c-coding-standard\u002Frules\u002Finput-output-fio\u002Ffio37-c","4.sei-cert-c-coding-standard\u002F03.rules\u002F11.input-output-fio\u002F05.fio37-c",{"title":3911,"path":3912,"stem":3913},"FIO38-C. Do not copy a FILE object","\u002Fsei-cert-c-coding-standard\u002Frules\u002Finput-output-fio\u002Ffio38-c","4.sei-cert-c-coding-standard\u002F03.rules\u002F11.input-output-fio\u002F06.fio38-c",{"title":3915,"path":3916,"stem":3917},"FIO39-C. Do not alternately input and output from a stream without an intervening flush or positioning call","\u002Fsei-cert-c-coding-standard\u002Frules\u002Finput-output-fio\u002Ffio39-c","4.sei-cert-c-coding-standard\u002F03.rules\u002F11.input-output-fio\u002F07.fio39-c",{"title":3919,"path":3920,"stem":3921},"FIO40-C. Reset strings on fgets() or fgetws() failure","\u002Fsei-cert-c-coding-standard\u002Frules\u002Finput-output-fio\u002Ffio40-c","4.sei-cert-c-coding-standard\u002F03.rules\u002F11.input-output-fio\u002F08.fio40-c",{"title":3923,"path":3924,"stem":3925},"FIO41-C. Do not call getc(), putc(), getwc(), or putwc() with a stream argument that has side effects","\u002Fsei-cert-c-coding-standard\u002Frules\u002Finput-output-fio\u002Ffio41-c","4.sei-cert-c-coding-standard\u002F03.rules\u002F11.input-output-fio\u002F09.fio41-c",{"title":3927,"path":3928,"stem":3929},"FIO42-C. Close files when they are no longer needed","\u002Fsei-cert-c-coding-standard\u002Frules\u002Finput-output-fio\u002Ffio42-c","4.sei-cert-c-coding-standard\u002F03.rules\u002F11.input-output-fio\u002F10.fio42-c",{"title":3931,"path":3932,"stem":3933},"FIO44-C. Only use values for fsetpos() that are returned from fgetpos()","\u002Fsei-cert-c-coding-standard\u002Frules\u002Finput-output-fio\u002Ffio44-c","4.sei-cert-c-coding-standard\u002F03.rules\u002F11.input-output-fio\u002F11.fio44-c",{"title":3935,"path":3936,"stem":3937},"FIO45-C. Avoid TOCTOU race conditions while accessing files","\u002Fsei-cert-c-coding-standard\u002Frules\u002Finput-output-fio\u002Ffio45-c","4.sei-cert-c-coding-standard\u002F03.rules\u002F11.input-output-fio\u002F12.fio45-c",{"title":3939,"path":3940,"stem":3941},"FIO46-C. Do not access a closed file","\u002Fsei-cert-c-coding-standard\u002Frules\u002Finput-output-fio\u002Ffio46-c","4.sei-cert-c-coding-standard\u002F03.rules\u002F11.input-output-fio\u002F13.fio46-c",{"title":3943,"path":3944,"stem":3945},"FIO47-C. Use valid format strings","\u002Fsei-cert-c-coding-standard\u002Frules\u002Finput-output-fio\u002Ffio47-c","4.sei-cert-c-coding-standard\u002F03.rules\u002F11.input-output-fio\u002F14.fio47-c",{"title":3947,"path":3948,"stem":3949,"children":3950},"Integers (INT)","\u002Fsei-cert-c-coding-standard\u002Frules\u002Fintegers-int","4.sei-cert-c-coding-standard\u002F03.rules\u002F12.integers-int\u002F1.index",[3951,3952,3956,3960,3964,3968,3972,3976],{"title":3947,"path":3948,"stem":3949},{"title":3953,"path":3954,"stem":3955},"INT30-C. Ensure that unsigned integer operations do not wrap","\u002Fsei-cert-c-coding-standard\u002Frules\u002Fintegers-int\u002Fint30-c","4.sei-cert-c-coding-standard\u002F03.rules\u002F12.integers-int\u002F2.int30-c",{"title":3957,"path":3958,"stem":3959},"INT31-C. Ensure that integer conversions do not result in lost or misinterpreted data","\u002Fsei-cert-c-coding-standard\u002Frules\u002Fintegers-int\u002Fint31-c","4.sei-cert-c-coding-standard\u002F03.rules\u002F12.integers-int\u002F3.int31-c",{"title":3961,"path":3962,"stem":3963},"INT32-C. Ensure that operations on signed integers do not result in overflow","\u002Fsei-cert-c-coding-standard\u002Frules\u002Fintegers-int\u002Fint32-c","4.sei-cert-c-coding-standard\u002F03.rules\u002F12.integers-int\u002F4.int32-c",{"title":3965,"path":3966,"stem":3967},"INT33-C. Ensure that division and remainder operations do not result in divide-by-zero errors","\u002Fsei-cert-c-coding-standard\u002Frules\u002Fintegers-int\u002Fint33-c","4.sei-cert-c-coding-standard\u002F03.rules\u002F12.integers-int\u002F5.int33-c",{"title":3969,"path":3970,"stem":3971},"INT34-C. Do not shift an expression by a negative number of bits or by greater than or equal to the number of bits that exist in the operand","\u002Fsei-cert-c-coding-standard\u002Frules\u002Fintegers-int\u002Fint34-c","4.sei-cert-c-coding-standard\u002F03.rules\u002F12.integers-int\u002F6.int34-c",{"title":3973,"path":3974,"stem":3975},"INT35-C. Use correct integer precisions","\u002Fsei-cert-c-coding-standard\u002Frules\u002Fintegers-int\u002Fint35-c","4.sei-cert-c-coding-standard\u002F03.rules\u002F12.integers-int\u002F7.int35-c",{"title":3977,"path":3978,"stem":3979},"INT36-C. Converting a pointer to integer or integer to pointer","\u002Fsei-cert-c-coding-standard\u002Frules\u002Fintegers-int\u002Fint36-c","4.sei-cert-c-coding-standard\u002F03.rules\u002F12.integers-int\u002F8.int36-c",{"title":3981,"path":3982,"stem":3983,"children":3984},"Memory Management (MEM)","\u002Fsei-cert-c-coding-standard\u002Frules\u002Fmemory-management-mem","4.sei-cert-c-coding-standard\u002F03.rules\u002F13.memory-management-mem\u002F1.index",[3985,3986,3990,3994,3998,4002,4006],{"title":3981,"path":3982,"stem":3983},{"title":3987,"path":3988,"stem":3989},"MEM30-C. Do not access freed memory","\u002Fsei-cert-c-coding-standard\u002Frules\u002Fmemory-management-mem\u002Fmem30-c","4.sei-cert-c-coding-standard\u002F03.rules\u002F13.memory-management-mem\u002F2.mem30-c",{"title":3991,"path":3992,"stem":3993},"MEM31-C. Free dynamically allocated memory when no longer needed","\u002Fsei-cert-c-coding-standard\u002Frules\u002Fmemory-management-mem\u002Fmem31-c","4.sei-cert-c-coding-standard\u002F03.rules\u002F13.memory-management-mem\u002F3.mem31-c",{"title":3995,"path":3996,"stem":3997},"MEM33-C. Allocate and copy structures containing a flexible array member dynamically","\u002Fsei-cert-c-coding-standard\u002Frules\u002Fmemory-management-mem\u002Fmem33-c","4.sei-cert-c-coding-standard\u002F03.rules\u002F13.memory-management-mem\u002F4.mem33-c",{"title":3999,"path":4000,"stem":4001},"MEM34-C. Only free memory allocated dynamically","\u002Fsei-cert-c-coding-standard\u002Frules\u002Fmemory-management-mem\u002Fmem34-c","4.sei-cert-c-coding-standard\u002F03.rules\u002F13.memory-management-mem\u002F5.mem34-c",{"title":4003,"path":4004,"stem":4005},"MEM35-C. Allocate sufficient memory for an object","\u002Fsei-cert-c-coding-standard\u002Frules\u002Fmemory-management-mem\u002Fmem35-c","4.sei-cert-c-coding-standard\u002F03.rules\u002F13.memory-management-mem\u002F6.mem35-c",{"title":4007,"path":4008,"stem":4009},"MEM36-C. Do not modify the alignment of objects by calling realloc()","\u002Fsei-cert-c-coding-standard\u002Frules\u002Fmemory-management-mem\u002Fmem36-c","4.sei-cert-c-coding-standard\u002F03.rules\u002F13.memory-management-mem\u002F7.mem36-c",{"title":4011,"path":4012,"stem":4013,"children":4014},"Microsoft Windows (WIN)","\u002Fsei-cert-c-coding-standard\u002Frules\u002Fmicrosoft-windows-win","4.sei-cert-c-coding-standard\u002F03.rules\u002F14.microsoft-windows-win\u002F1.index",[4015,4016],{"title":4011,"path":4012,"stem":4013},{"title":4017,"path":4018,"stem":4019},"WIN30-C. Properly pair allocation and deallocation functions","\u002Fsei-cert-c-coding-standard\u002Frules\u002Fmicrosoft-windows-win\u002Fwin30-c","4.sei-cert-c-coding-standard\u002F03.rules\u002F14.microsoft-windows-win\u002F2.win30-c",{"title":4021,"path":4022,"stem":4023,"children":4024},"Miscellaneous (MSC)","\u002Fsei-cert-c-coding-standard\u002Frules\u002Fmiscellaneous-msc","4.sei-cert-c-coding-standard\u002F03.rules\u002F15.miscellaneous-msc\u002F1.index",[4025,4026,4030,4034,4038,4042,4046,4050,4054],{"title":4021,"path":4022,"stem":4023},{"title":4027,"path":4028,"stem":4029},"MSC30-C. Do not use the rand() function for generating pseudorandom numbers","\u002Fsei-cert-c-coding-standard\u002Frules\u002Fmiscellaneous-msc\u002Fmsc30-c","4.sei-cert-c-coding-standard\u002F03.rules\u002F15.miscellaneous-msc\u002F2.msc30-c",{"title":4031,"path":4032,"stem":4033},"MSC32-C. Properly seed pseudorandom number generators","\u002Fsei-cert-c-coding-standard\u002Frules\u002Fmiscellaneous-msc\u002Fmsc32-c","4.sei-cert-c-coding-standard\u002F03.rules\u002F15.miscellaneous-msc\u002F3.msc32-c",{"title":4035,"path":4036,"stem":4037},"MSC33-C. Do not pass invalid data to the asctime() function","\u002Fsei-cert-c-coding-standard\u002Frules\u002Fmiscellaneous-msc\u002Fmsc33-c","4.sei-cert-c-coding-standard\u002F03.rules\u002F15.miscellaneous-msc\u002F4.msc33-c",{"title":4039,"path":4040,"stem":4041},"MSC37-C. Ensure that control never reaches the end of a non-void function","\u002Fsei-cert-c-coding-standard\u002Frules\u002Fmiscellaneous-msc\u002Fmsc37-c","4.sei-cert-c-coding-standard\u002F03.rules\u002F15.miscellaneous-msc\u002F5.msc37-c",{"title":4043,"path":4044,"stem":4045},"MSC38-C. Do not treat a predefined identifier as an object if it might only be implemented as a macro","\u002Fsei-cert-c-coding-standard\u002Frules\u002Fmiscellaneous-msc\u002Fmsc38-c","4.sei-cert-c-coding-standard\u002F03.rules\u002F15.miscellaneous-msc\u002F6.msc38-c",{"title":4047,"path":4048,"stem":4049},"MSC39-C. Do not call va_arg() on a va_list that has an indeterminate value","\u002Fsei-cert-c-coding-standard\u002Frules\u002Fmiscellaneous-msc\u002Fmsc39-c","4.sei-cert-c-coding-standard\u002F03.rules\u002F15.miscellaneous-msc\u002F7.msc39-c",{"title":4051,"path":4052,"stem":4053},"MSC40-C. Do not violate constraints","\u002Fsei-cert-c-coding-standard\u002Frules\u002Fmiscellaneous-msc\u002Fmsc40-c","4.sei-cert-c-coding-standard\u002F03.rules\u002F15.miscellaneous-msc\u002F8.msc40-c",{"title":4055,"path":4056,"stem":4057},"MSC41-C. Never hard code sensitive information","\u002Fsei-cert-c-coding-standard\u002Frules\u002Fmiscellaneous-msc\u002Fmsc41-c","4.sei-cert-c-coding-standard\u002F03.rules\u002F15.miscellaneous-msc\u002F9.msc41-c",{"title":4059,"path":4060,"stem":4061,"children":4062},"POSIX (POS)","\u002Fsei-cert-c-coding-standard\u002Frules\u002Fposix-pos","4.sei-cert-c-coding-standard\u002F03.rules\u002F16.posix-pos\u002F01.index",[4063,4064,4068,4072,4076,4080,4084,4088,4092,4096,4100,4104,4108,4112,4116,4120,4124],{"title":4059,"path":4060,"stem":4061},{"title":4065,"path":4066,"stem":4067},"POS30-C. Use the readlink() function properly","\u002Fsei-cert-c-coding-standard\u002Frules\u002Fposix-pos\u002Fpos30-c","4.sei-cert-c-coding-standard\u002F03.rules\u002F16.posix-pos\u002F02.pos30-c",{"title":4069,"path":4070,"stem":4071},"POS34-C. Do not call putenv() with a pointer to an automatic variable as the argument","\u002Fsei-cert-c-coding-standard\u002Frules\u002Fposix-pos\u002Fpos34-c","4.sei-cert-c-coding-standard\u002F03.rules\u002F16.posix-pos\u002F03.pos34-c",{"title":4073,"path":4074,"stem":4075},"POS35-C. Avoid race conditions while checking for the existence of a symbolic link","\u002Fsei-cert-c-coding-standard\u002Frules\u002Fposix-pos\u002Fpos35-c","4.sei-cert-c-coding-standard\u002F03.rules\u002F16.posix-pos\u002F04.pos35-c",{"title":4077,"path":4078,"stem":4079},"POS36-C. Observe correct revocation order while relinquishing privileges","\u002Fsei-cert-c-coding-standard\u002Frules\u002Fposix-pos\u002Fpos36-c","4.sei-cert-c-coding-standard\u002F03.rules\u002F16.posix-pos\u002F05.pos36-c",{"title":4081,"path":4082,"stem":4083},"POS37-C. Ensure that privilege relinquishment is successful","\u002Fsei-cert-c-coding-standard\u002Frules\u002Fposix-pos\u002Fpos37-c","4.sei-cert-c-coding-standard\u002F03.rules\u002F16.posix-pos\u002F06.pos37-c",{"title":4085,"path":4086,"stem":4087},"POS38-C. Beware of race conditions when using fork and file descriptors","\u002Fsei-cert-c-coding-standard\u002Frules\u002Fposix-pos\u002Fpos38-c","4.sei-cert-c-coding-standard\u002F03.rules\u002F16.posix-pos\u002F07.pos38-c",{"title":4089,"path":4090,"stem":4091},"POS39-C. Use the correct byte ordering when transferring data between systems","\u002Fsei-cert-c-coding-standard\u002Frules\u002Fposix-pos\u002Fpos39-c","4.sei-cert-c-coding-standard\u002F03.rules\u002F16.posix-pos\u002F08.pos39-c",{"title":4093,"path":4094,"stem":4095},"POS44-C. Do not use signals to terminate threads","\u002Fsei-cert-c-coding-standard\u002Frules\u002Fposix-pos\u002Fpos44-c","4.sei-cert-c-coding-standard\u002F03.rules\u002F16.posix-pos\u002F09.pos44-c",{"title":4097,"path":4098,"stem":4099},"POS47-C. Do not use threads that can be canceled asynchronously","\u002Fsei-cert-c-coding-standard\u002Frules\u002Fposix-pos\u002Fpos47-c","4.sei-cert-c-coding-standard\u002F03.rules\u002F16.posix-pos\u002F10.pos47-c",{"title":4101,"path":4102,"stem":4103},"POS48-C. Do not unlock or destroy another POSIX thread's mutex","\u002Fsei-cert-c-coding-standard\u002Frules\u002Fposix-pos\u002Fpos48-c","4.sei-cert-c-coding-standard\u002F03.rules\u002F16.posix-pos\u002F11.pos48-c",{"title":4105,"path":4106,"stem":4107},"POS49-C. When data must be accessed by multiple threads, provide a mutex and guarantee no adjacent data is also accessed","\u002Fsei-cert-c-coding-standard\u002Frules\u002Fposix-pos\u002Fpos49-c","4.sei-cert-c-coding-standard\u002F03.rules\u002F16.posix-pos\u002F12.pos49-c",{"title":4109,"path":4110,"stem":4111},"POS50-C. Declare objects shared between POSIX threads with appropriate storage durations","\u002Fsei-cert-c-coding-standard\u002Frules\u002Fposix-pos\u002Fpos50-c","4.sei-cert-c-coding-standard\u002F03.rules\u002F16.posix-pos\u002F13.pos50-c",{"title":4113,"path":4114,"stem":4115},"POS51-C. Avoid deadlock with POSIX threads by locking in predefined order","\u002Fsei-cert-c-coding-standard\u002Frules\u002Fposix-pos\u002Fpos51-c","4.sei-cert-c-coding-standard\u002F03.rules\u002F16.posix-pos\u002F14.pos51-c",{"title":4117,"path":4118,"stem":4119},"POS52-C. Do not perform operations that can block while holding a POSIX lock","\u002Fsei-cert-c-coding-standard\u002Frules\u002Fposix-pos\u002Fpos52-c","4.sei-cert-c-coding-standard\u002F03.rules\u002F16.posix-pos\u002F15.pos52-c",{"title":4121,"path":4122,"stem":4123},"POS53-C. Do not use more than one mutex for concurrent waiting operations on a condition variable","\u002Fsei-cert-c-coding-standard\u002Frules\u002Fposix-pos\u002Fpos53-c","4.sei-cert-c-coding-standard\u002F03.rules\u002F16.posix-pos\u002F16.pos53-c",{"title":4125,"path":4126,"stem":4127},"POS54-C. Detect and handle POSIX library errors","\u002Fsei-cert-c-coding-standard\u002Frules\u002Fposix-pos\u002Fpos54-c","4.sei-cert-c-coding-standard\u002F03.rules\u002F16.posix-pos\u002F17.pos54-c",{"title":4129,"path":4130,"stem":4131,"children":4132},"Preprocessor (PRE)","\u002Fsei-cert-c-coding-standard\u002Frules\u002Fpreprocessor-pre","4.sei-cert-c-coding-standard\u002F03.rules\u002F17.preprocessor-pre\u002F1.index",[4133,4134,4138,4142],{"title":4129,"path":4130,"stem":4131},{"title":4135,"path":4136,"stem":4137},"PRE30-C. Do not create a universal character name through concatenation","\u002Fsei-cert-c-coding-standard\u002Frules\u002Fpreprocessor-pre\u002Fpre30-c","4.sei-cert-c-coding-standard\u002F03.rules\u002F17.preprocessor-pre\u002F2.pre30-c",{"title":4139,"path":4140,"stem":4141},"PRE31-C. Avoid side effects in arguments to unsafe macros","\u002Fsei-cert-c-coding-standard\u002Frules\u002Fpreprocessor-pre\u002Fpre31-c","4.sei-cert-c-coding-standard\u002F03.rules\u002F17.preprocessor-pre\u002F3.pre31-c",{"title":4143,"path":4144,"stem":4145},"PRE32-C. Do not use preprocessor directives in invocations of function-like macros","\u002Fsei-cert-c-coding-standard\u002Frules\u002Fpreprocessor-pre\u002Fpre32-c","4.sei-cert-c-coding-standard\u002F03.rules\u002F17.preprocessor-pre\u002F4.pre32-c",{"title":4147,"path":4148,"stem":4149,"children":4150},"Signals (SIG)","\u002Fsei-cert-c-coding-standard\u002Frules\u002Fsignals-sig","4.sei-cert-c-coding-standard\u002F03.rules\u002F18.signals-sig\u002F1.index",[4151,4152,4156,4160,4164],{"title":4147,"path":4148,"stem":4149},{"title":4153,"path":4154,"stem":4155},"SIG30-C. Call only asynchronous-safe functions within signal handlers","\u002Fsei-cert-c-coding-standard\u002Frules\u002Fsignals-sig\u002Fsig30-c","4.sei-cert-c-coding-standard\u002F03.rules\u002F18.signals-sig\u002F2.sig30-c",{"title":4157,"path":4158,"stem":4159},"SIG31-C. Do not access shared objects in signal handlers","\u002Fsei-cert-c-coding-standard\u002Frules\u002Fsignals-sig\u002Fsig31-c","4.sei-cert-c-coding-standard\u002F03.rules\u002F18.signals-sig\u002F3.sig31-c",{"title":4161,"path":4162,"stem":4163},"SIG34-C. Do not call signal() from within interruptible signal handlers","\u002Fsei-cert-c-coding-standard\u002Frules\u002Fsignals-sig\u002Fsig34-c","4.sei-cert-c-coding-standard\u002F03.rules\u002F18.signals-sig\u002F4.sig34-c",{"title":4165,"path":4166,"stem":4167},"SIG35-C. Do not return from a computational exception signal handler","\u002Fsei-cert-c-coding-standard\u002Frules\u002Fsignals-sig\u002Fsig35-c","4.sei-cert-c-coding-standard\u002F03.rules\u002F18.signals-sig\u002F5.sig35-c",{"title":4169,"path":4170,"stem":4171,"children":4172},"Back Matter","\u002Fsei-cert-c-coding-standard\u002Fback-matter","4.sei-cert-c-coding-standard\u002F04.back-matter\u002F1.index",[4173,4174,4178,4182,4186,4190,4404,4461],{"title":4169,"path":4170,"stem":4171},{"title":4175,"path":4176,"stem":4177},"AA. Bibliography","\u002Fsei-cert-c-coding-standard\u002Fback-matter\u002Faa-bibliography","4.sei-cert-c-coding-standard\u002F04.back-matter\u002F2.aa-bibliography",{"title":4179,"path":4180,"stem":4181},"BB. Definitions","\u002Fsei-cert-c-coding-standard\u002Fback-matter\u002Fbb-definitions","4.sei-cert-c-coding-standard\u002F04.back-matter\u002F3.bb-definitions",{"title":4183,"path":4184,"stem":4185},"CC. Undefined Behavior","\u002Fsei-cert-c-coding-standard\u002Fback-matter\u002Fcc-undefined-behavior","4.sei-cert-c-coding-standard\u002F04.back-matter\u002F4.cc-undefined-behavior",{"title":4187,"path":4188,"stem":4189},"DD. Unspecified Behavior","\u002Fsei-cert-c-coding-standard\u002Fback-matter\u002Fdd-unspecified-behavior","4.sei-cert-c-coding-standard\u002F04.back-matter\u002F5.dd-unspecified-behavior",{"title":4191,"path":4192,"stem":4193,"children":4194},"EE. Analyzers","\u002Fsei-cert-c-coding-standard\u002Fback-matter\u002Fee-analyzers","4.sei-cert-c-coding-standard\u002F04.back-matter\u002F6.ee-analyzers\u002F01.index",[4195,4196,4200,4204,4208,4212,4216,4220,4224,4228,4232,4236,4240,4244,4248,4252,4256,4260,4264,4268,4272,4276,4280,4284,4288,4292,4296,4300,4304,4308,4312,4316,4320,4324,4328,4332,4336,4340,4344,4348,4352,4356,4360,4364,4368,4372,4376,4380,4384,4388,4392,4396,4400],{"title":4191,"path":4192,"stem":4193},{"title":4197,"path":4198,"stem":4199},"Astrée","\u002Fsei-cert-c-coding-standard\u002Fback-matter\u002Fee-analyzers\u002Fastree","4.sei-cert-c-coding-standard\u002F04.back-matter\u002F6.ee-analyzers\u002F02.astree",{"title":4201,"path":4202,"stem":4203},"Astrée_V","\u002Fsei-cert-c-coding-standard\u002Fback-matter\u002Fee-analyzers\u002Fastree_v","4.sei-cert-c-coding-standard\u002F04.back-matter\u002F6.ee-analyzers\u002F03.astree_v",{"title":4205,"path":4206,"stem":4207},"Axivion Bauhaus Suite","\u002Fsei-cert-c-coding-standard\u002Fback-matter\u002Fee-analyzers\u002Faxivion-bauhaus-suite","4.sei-cert-c-coding-standard\u002F04.back-matter\u002F6.ee-analyzers\u002F04.axivion-bauhaus-suite",{"title":4209,"path":4210,"stem":4211},"Axivion Bauhaus Suite_V","\u002Fsei-cert-c-coding-standard\u002Fback-matter\u002Fee-analyzers\u002Faxivion-bauhaus-suite_v","4.sei-cert-c-coding-standard\u002F04.back-matter\u002F6.ee-analyzers\u002F05.axivion-bauhaus-suite_v",{"title":4213,"path":4214,"stem":4215},"Clang","\u002Fsei-cert-c-coding-standard\u002Fback-matter\u002Fee-analyzers\u002Fclang","4.sei-cert-c-coding-standard\u002F04.back-matter\u002F6.ee-analyzers\u002F06.clang",{"title":4217,"path":4218,"stem":4219},"Clang_38_V","\u002Fsei-cert-c-coding-standard\u002Fback-matter\u002Fee-analyzers\u002Fclang_38_v","4.sei-cert-c-coding-standard\u002F04.back-matter\u002F6.ee-analyzers\u002F07.clang_38_v",{"title":4221,"path":4222,"stem":4223},"Clang_39_V","\u002Fsei-cert-c-coding-standard\u002Fback-matter\u002Fee-analyzers\u002Fclang_39_v","4.sei-cert-c-coding-standard\u002F04.back-matter\u002F6.ee-analyzers\u002F08.clang_39_v",{"title":4225,"path":4226,"stem":4227},"Clang_40_V","\u002Fsei-cert-c-coding-standard\u002Fback-matter\u002Fee-analyzers\u002Fclang_40_v","4.sei-cert-c-coding-standard\u002F04.back-matter\u002F6.ee-analyzers\u002F09.clang_40_v",{"title":4229,"path":4230,"stem":4231},"Clang_V","\u002Fsei-cert-c-coding-standard\u002Fback-matter\u002Fee-analyzers\u002Fclang_v","4.sei-cert-c-coding-standard\u002F04.back-matter\u002F6.ee-analyzers\u002F10.clang_v",{"title":4233,"path":4234,"stem":4235},"Codee","\u002Fsei-cert-c-coding-standard\u002Fback-matter\u002Fee-analyzers\u002Fcodee","4.sei-cert-c-coding-standard\u002F04.back-matter\u002F6.ee-analyzers\u002F11.codee",{"title":4237,"path":4238,"stem":4239},"Codee_V","\u002Fsei-cert-c-coding-standard\u002Fback-matter\u002Fee-analyzers\u002Fcodee_v","4.sei-cert-c-coding-standard\u002F04.back-matter\u002F6.ee-analyzers\u002F12.codee_v",{"title":4241,"path":4242,"stem":4243},"CodeSonar","\u002Fsei-cert-c-coding-standard\u002Fback-matter\u002Fee-analyzers\u002Fcodesonar","4.sei-cert-c-coding-standard\u002F04.back-matter\u002F6.ee-analyzers\u002F13.codesonar",{"title":4245,"path":4246,"stem":4247},"CodeSonar_V","\u002Fsei-cert-c-coding-standard\u002Fback-matter\u002Fee-analyzers\u002Fcodesonar_v","4.sei-cert-c-coding-standard\u002F04.back-matter\u002F6.ee-analyzers\u002F14.codesonar_v",{"title":4249,"path":4250,"stem":4251},"Coverity","\u002Fsei-cert-c-coding-standard\u002Fback-matter\u002Fee-analyzers\u002Fcoverity","4.sei-cert-c-coding-standard\u002F04.back-matter\u002F6.ee-analyzers\u002F15.coverity",{"title":4253,"path":4254,"stem":4255},"Coverity_V","\u002Fsei-cert-c-coding-standard\u002Fback-matter\u002Fee-analyzers\u002Fcoverity_v","4.sei-cert-c-coding-standard\u002F04.back-matter\u002F6.ee-analyzers\u002F16.coverity_v",{"title":4257,"path":4258,"stem":4259},"Cppcheck","\u002Fsei-cert-c-coding-standard\u002Fback-matter\u002Fee-analyzers\u002Fcppcheck","4.sei-cert-c-coding-standard\u002F04.back-matter\u002F6.ee-analyzers\u002F17.cppcheck",{"title":4261,"path":4262,"stem":4263},"Cppcheck Premium","\u002Fsei-cert-c-coding-standard\u002Fback-matter\u002Fee-analyzers\u002Fcppcheck-premium","4.sei-cert-c-coding-standard\u002F04.back-matter\u002F6.ee-analyzers\u002F18.cppcheck-premium",{"title":4265,"path":4266,"stem":4267},"Cppcheck Premium_V","\u002Fsei-cert-c-coding-standard\u002Fback-matter\u002Fee-analyzers\u002Fcppcheck-premium_v","4.sei-cert-c-coding-standard\u002F04.back-matter\u002F6.ee-analyzers\u002F19.cppcheck-premium_v",{"title":4269,"path":4270,"stem":4271},"Cppcheck_V","\u002Fsei-cert-c-coding-standard\u002Fback-matter\u002Fee-analyzers\u002Fcppcheck_v","4.sei-cert-c-coding-standard\u002F04.back-matter\u002F6.ee-analyzers\u002F20.cppcheck_v",{"title":4273,"path":4274,"stem":4275},"ECLAIR","\u002Fsei-cert-c-coding-standard\u002Fback-matter\u002Fee-analyzers\u002Feclair","4.sei-cert-c-coding-standard\u002F04.back-matter\u002F6.ee-analyzers\u002F21.eclair",{"title":4277,"path":4278,"stem":4279},"ECLAIR_V","\u002Fsei-cert-c-coding-standard\u002Fback-matter\u002Fee-analyzers\u002Feclair_v","4.sei-cert-c-coding-standard\u002F04.back-matter\u002F6.ee-analyzers\u002F22.eclair_v",{"title":4281,"path":4282,"stem":4283},"EDG","\u002Fsei-cert-c-coding-standard\u002Fback-matter\u002Fee-analyzers\u002Fedg","4.sei-cert-c-coding-standard\u002F04.back-matter\u002F6.ee-analyzers\u002F23.edg",{"title":4285,"path":4286,"stem":4287},"EDG_V","\u002Fsei-cert-c-coding-standard\u002Fback-matter\u002Fee-analyzers\u002Fedg_v","4.sei-cert-c-coding-standard\u002F04.back-matter\u002F6.ee-analyzers\u002F24.edg_v",{"title":4289,"path":4290,"stem":4291},"GCC","\u002Fsei-cert-c-coding-standard\u002Fback-matter\u002Fee-analyzers\u002Fgcc","4.sei-cert-c-coding-standard\u002F04.back-matter\u002F6.ee-analyzers\u002F25.gcc",{"title":4293,"path":4294,"stem":4295},"GCC_V","\u002Fsei-cert-c-coding-standard\u002Fback-matter\u002Fee-analyzers\u002Fgcc_v","4.sei-cert-c-coding-standard\u002F04.back-matter\u002F6.ee-analyzers\u002F26.gcc_v",{"title":4297,"path":4298,"stem":4299},"Helix QAC","\u002Fsei-cert-c-coding-standard\u002Fback-matter\u002Fee-analyzers\u002Fhelix-qac","4.sei-cert-c-coding-standard\u002F04.back-matter\u002F6.ee-analyzers\u002F27.helix-qac",{"title":4301,"path":4302,"stem":4303},"Helix QAC_V","\u002Fsei-cert-c-coding-standard\u002Fback-matter\u002Fee-analyzers\u002Fhelix-qac_v","4.sei-cert-c-coding-standard\u002F04.back-matter\u002F6.ee-analyzers\u002F28.helix-qac_v",{"title":4305,"path":4306,"stem":4307},"Klocwork","\u002Fsei-cert-c-coding-standard\u002Fback-matter\u002Fee-analyzers\u002Fklocwork","4.sei-cert-c-coding-standard\u002F04.back-matter\u002F6.ee-analyzers\u002F29.klocwork",{"title":4309,"path":4310,"stem":4311},"Klocwork_V","\u002Fsei-cert-c-coding-standard\u002Fback-matter\u002Fee-analyzers\u002Fklocwork_v","4.sei-cert-c-coding-standard\u002F04.back-matter\u002F6.ee-analyzers\u002F30.klocwork_v",{"title":4313,"path":4314,"stem":4315},"LDRA","\u002Fsei-cert-c-coding-standard\u002Fback-matter\u002Fee-analyzers\u002Fldra","4.sei-cert-c-coding-standard\u002F04.back-matter\u002F6.ee-analyzers\u002F31.ldra",{"title":4317,"path":4318,"stem":4319},"LDRA_V","\u002Fsei-cert-c-coding-standard\u002Fback-matter\u002Fee-analyzers\u002Fldra_v","4.sei-cert-c-coding-standard\u002F04.back-matter\u002F6.ee-analyzers\u002F32.ldra_v",{"title":4321,"path":4322,"stem":4323},"Parasoft","\u002Fsei-cert-c-coding-standard\u002Fback-matter\u002Fee-analyzers\u002Fparasoft","4.sei-cert-c-coding-standard\u002F04.back-matter\u002F6.ee-analyzers\u002F33.parasoft",{"title":4325,"path":4326,"stem":4327},"Parasoft_V","\u002Fsei-cert-c-coding-standard\u002Fback-matter\u002Fee-analyzers\u002Fparasoft_v","4.sei-cert-c-coding-standard\u002F04.back-matter\u002F6.ee-analyzers\u002F34.parasoft_v",{"title":4329,"path":4330,"stem":4331},"PC-lint Plus","\u002Fsei-cert-c-coding-standard\u002Fback-matter\u002Fee-analyzers\u002Fpc-lint-plus","4.sei-cert-c-coding-standard\u002F04.back-matter\u002F6.ee-analyzers\u002F35.pc-lint-plus",{"title":4333,"path":4334,"stem":4335},"PC-lint Plus_V","\u002Fsei-cert-c-coding-standard\u002Fback-matter\u002Fee-analyzers\u002Fpc-lint-plus_v","4.sei-cert-c-coding-standard\u002F04.back-matter\u002F6.ee-analyzers\u002F36.pc-lint-plus_v",{"title":4337,"path":4338,"stem":4339},"Polyspace Bug Finder","\u002Fsei-cert-c-coding-standard\u002Fback-matter\u002Fee-analyzers\u002Fpolyspace-bug-finder","4.sei-cert-c-coding-standard\u002F04.back-matter\u002F6.ee-analyzers\u002F37.polyspace-bug-finder",{"title":4341,"path":4342,"stem":4343},"Polyspace Bug Finder_V","\u002Fsei-cert-c-coding-standard\u002Fback-matter\u002Fee-analyzers\u002Fpolyspace-bug-finder_v","4.sei-cert-c-coding-standard\u002F04.back-matter\u002F6.ee-analyzers\u002F38.polyspace-bug-finder_v",{"title":4345,"path":4346,"stem":4347},"PVS-Studio","\u002Fsei-cert-c-coding-standard\u002Fback-matter\u002Fee-analyzers\u002Fpvs-studio","4.sei-cert-c-coding-standard\u002F04.back-matter\u002F6.ee-analyzers\u002F39.pvs-studio",{"title":4349,"path":4350,"stem":4351},"PVS-Studio_V","\u002Fsei-cert-c-coding-standard\u002Fback-matter\u002Fee-analyzers\u002Fpvs-studio_v","4.sei-cert-c-coding-standard\u002F04.back-matter\u002F6.ee-analyzers\u002F40.pvs-studio_v",{"title":4353,"path":4354,"stem":4355},"Rose","\u002Fsei-cert-c-coding-standard\u002Fback-matter\u002Fee-analyzers\u002Frose","4.sei-cert-c-coding-standard\u002F04.back-matter\u002F6.ee-analyzers\u002F41.rose",{"title":4357,"path":4358,"stem":4359},"Rose_V","\u002Fsei-cert-c-coding-standard\u002Fback-matter\u002Fee-analyzers\u002Frose_v","4.sei-cert-c-coding-standard\u002F04.back-matter\u002F6.ee-analyzers\u002F42.rose_v",{"title":4361,"path":4362,"stem":4363},"Rosecheckers Code","\u002Fsei-cert-c-coding-standard\u002Fback-matter\u002Fee-analyzers\u002Frosecheckers-code","4.sei-cert-c-coding-standard\u002F04.back-matter\u002F6.ee-analyzers\u002F43.rosecheckers-code",{"title":4365,"path":4366,"stem":4367},"RuleChecker","\u002Fsei-cert-c-coding-standard\u002Fback-matter\u002Fee-analyzers\u002Frulechecker","4.sei-cert-c-coding-standard\u002F04.back-matter\u002F6.ee-analyzers\u002F44.rulechecker",{"title":4369,"path":4370,"stem":4371},"RuleChecker_V","\u002Fsei-cert-c-coding-standard\u002Fback-matter\u002Fee-analyzers\u002Frulechecker_v","4.sei-cert-c-coding-standard\u002F04.back-matter\u002F6.ee-analyzers\u002F45.rulechecker_v",{"title":4373,"path":4374,"stem":4375},"Security Reviewer - Static Reviewer","\u002Fsei-cert-c-coding-standard\u002Fback-matter\u002Fee-analyzers\u002Fsecurity-reviewer-static-reviewer","4.sei-cert-c-coding-standard\u002F04.back-matter\u002F6.ee-analyzers\u002F46.security-reviewer-static-reviewer",{"title":4377,"path":4378,"stem":4379},"Security Reviewer - Static Reviewer_V","\u002Fsei-cert-c-coding-standard\u002Fback-matter\u002Fee-analyzers\u002Fsecurity-reviewer-static-reviewer_v","4.sei-cert-c-coding-standard\u002F04.back-matter\u002F6.ee-analyzers\u002F47.security-reviewer-static-reviewer_v",{"title":4381,"path":4382,"stem":4383},"SonarQube C\u002FC++ Plugin","\u002Fsei-cert-c-coding-standard\u002Fback-matter\u002Fee-analyzers\u002Fsonarqube-ccpp-plugin","4.sei-cert-c-coding-standard\u002F04.back-matter\u002F6.ee-analyzers\u002F48.sonarqube-ccpp-plugin",{"title":4385,"path":4386,"stem":4387},"SonarQube C\u002FC++ Plugin_V","\u002Fsei-cert-c-coding-standard\u002Fback-matter\u002Fee-analyzers\u002Fsonarqube-ccpp-plugin_v","4.sei-cert-c-coding-standard\u002F04.back-matter\u002F6.ee-analyzers\u002F49.sonarqube-ccpp-plugin_v",{"title":4389,"path":4390,"stem":4391},"Splint","\u002Fsei-cert-c-coding-standard\u002Fback-matter\u002Fee-analyzers\u002Fsplint","4.sei-cert-c-coding-standard\u002F04.back-matter\u002F6.ee-analyzers\u002F50.splint",{"title":4393,"path":4394,"stem":4395},"Splint_V","\u002Fsei-cert-c-coding-standard\u002Fback-matter\u002Fee-analyzers\u002Fsplint_v","4.sei-cert-c-coding-standard\u002F04.back-matter\u002F6.ee-analyzers\u002F51.splint_v",{"title":4397,"path":4398,"stem":4399},"TrustInSoft Analyzer","\u002Fsei-cert-c-coding-standard\u002Fback-matter\u002Fee-analyzers\u002Ftrustinsoft-analyzer","4.sei-cert-c-coding-standard\u002F04.back-matter\u002F6.ee-analyzers\u002F52.trustinsoft-analyzer",{"title":4401,"path":4402,"stem":4403},"TrustInSoft Analyzer_V","\u002Fsei-cert-c-coding-standard\u002Fback-matter\u002Fee-analyzers\u002Ftrustinsoft-analyzer_v","4.sei-cert-c-coding-standard\u002F04.back-matter\u002F6.ee-analyzers\u002F53.trustinsoft-analyzer_v",{"title":4405,"path":4406,"stem":4407,"children":4408},"FF. Related Guidelines","\u002Fsei-cert-c-coding-standard\u002Fback-matter\u002Fff-related-guidelines","4.sei-cert-c-coding-standard\u002F04.back-matter\u002F7.ff-related-guidelines\u002F01.index",[4409,4410,4414,4418,4422,4426,4430,4434,4438,4442,4445,4449,4453,4457],{"title":4405,"path":4406,"stem":4407},{"title":4411,"path":4412,"stem":4413},"2003","\u002Fsei-cert-c-coding-standard\u002Fback-matter\u002Fff-related-guidelines\u002F02.2003","4.sei-cert-c-coding-standard\u002F04.back-matter\u002F7.ff-related-guidelines\u002F02.2003",{"title":4415,"path":4416,"stem":4417},"2006","\u002Fsei-cert-c-coding-standard\u002Fback-matter\u002Fff-related-guidelines\u002F03.2006","4.sei-cert-c-coding-standard\u002F04.back-matter\u002F7.ff-related-guidelines\u002F03.2006",{"title":4419,"path":4420,"stem":4421},"2007","\u002Fsei-cert-c-coding-standard\u002Fback-matter\u002Fff-related-guidelines\u002F04.2007","4.sei-cert-c-coding-standard\u002F04.back-matter\u002F7.ff-related-guidelines\u002F04.2007",{"title":4423,"path":4424,"stem":4425},"2008","\u002Fsei-cert-c-coding-standard\u002Fback-matter\u002Fff-related-guidelines\u002F05.2008","4.sei-cert-c-coding-standard\u002F04.back-matter\u002F7.ff-related-guidelines\u002F05.2008",{"title":4427,"path":4428,"stem":4429},"2010","\u002Fsei-cert-c-coding-standard\u002Fback-matter\u002Fff-related-guidelines\u002F06.2010","4.sei-cert-c-coding-standard\u002F04.back-matter\u002F7.ff-related-guidelines\u002F06.2010",{"title":4431,"path":4432,"stem":4433},"2011","\u002Fsei-cert-c-coding-standard\u002Fback-matter\u002Fff-related-guidelines\u002F07.2011","4.sei-cert-c-coding-standard\u002F04.back-matter\u002F7.ff-related-guidelines\u002F07.2011",{"title":4435,"path":4436,"stem":4437},"2012","\u002Fsei-cert-c-coding-standard\u002Fback-matter\u002Fff-related-guidelines\u002F08.2012","4.sei-cert-c-coding-standard\u002F04.back-matter\u002F7.ff-related-guidelines\u002F08.2012",{"title":4439,"path":4440,"stem":4441},"2013","\u002Fsei-cert-c-coding-standard\u002Fback-matter\u002Fff-related-guidelines\u002F09.2013","4.sei-cert-c-coding-standard\u002F04.back-matter\u002F7.ff-related-guidelines\u002F09.2013",{"title":4439,"path":4443,"stem":4444},"\u002Fsei-cert-c-coding-standard\u002Fback-matter\u002Fff-related-guidelines\u002F10.2013","4.sei-cert-c-coding-standard\u002F04.back-matter\u002F7.ff-related-guidelines\u002F10.2013",{"title":4446,"path":4447,"stem":4448},"MITRE CWE","\u002Fsei-cert-c-coding-standard\u002Fback-matter\u002Fff-related-guidelines\u002Fmitre-cwe","4.sei-cert-c-coding-standard\u002F04.back-matter\u002F7.ff-related-guidelines\u002F11.mitre-cwe",{"title":4450,"path":4451,"stem":4452},"MITRE CWE 2.11","\u002Fsei-cert-c-coding-standard\u002Fback-matter\u002Fff-related-guidelines\u002Fmitre-cwe-211","4.sei-cert-c-coding-standard\u002F04.back-matter\u002F7.ff-related-guidelines\u002F12.mitre-cwe-211",{"title":4454,"path":4455,"stem":4456},"MITRE CWE 3.1","\u002Fsei-cert-c-coding-standard\u002Fback-matter\u002Fff-related-guidelines\u002Fmitre-cwe-31","4.sei-cert-c-coding-standard\u002F04.back-matter\u002F7.ff-related-guidelines\u002F13.mitre-cwe-31",{"title":4458,"path":4459,"stem":4460},"MITRE CWE 3.11","\u002Fsei-cert-c-coding-standard\u002Fback-matter\u002Fff-related-guidelines\u002Fmitre-cwe-311","4.sei-cert-c-coding-standard\u002F04.back-matter\u002F7.ff-related-guidelines\u002F14.mitre-cwe-311",{"title":4462,"path":4463,"stem":4464},"GG. Risk Assessments","\u002Fsei-cert-c-coding-standard\u002Fback-matter\u002Fgg-risk-assessments","4.sei-cert-c-coding-standard\u002F04.back-matter\u002F8.gg-risk-assessments",{"title":4466,"path":4467,"stem":4468,"children":4469},"Admin","\u002Fsei-cert-c-coding-standard\u002Fadmin","4.sei-cert-c-coding-standard\u002F05.admin\u002F1.index",[4470,4471,4475],{"title":4466,"path":4467,"stem":4468},{"title":4472,"path":4473,"stem":4474},"TODO List","\u002Fsei-cert-c-coding-standard\u002Fadmin\u002Ftodo-list","4.sei-cert-c-coding-standard\u002F05.admin\u002F2.todo-list",{"title":4476,"path":4477,"stem":4478},"Undefined and implementation-defined behaviors not deemed ruleworthy","\u002Fsei-cert-c-coding-standard\u002Fadmin\u002Fundefined-and-implementation-defined-behaviors-not-deemed-ruleworthy","4.sei-cert-c-coding-standard\u002F05.admin\u002F3.undefined-and-implementation-defined-behaviors-not-deemed-ruleworthy",{"title":4480,"path":4481,"stem":4482},"Coding Style Guidelines","\u002Fsei-cert-c-coding-standard\u002Fcoding-style-guidelines","4.sei-cert-c-coding-standard\u002F05.coding-style-guidelines",{"title":4484,"path":4485,"stem":4486},"Errata for SEI CERT C Coding Standard (2016 Edition)","\u002Fsei-cert-c-coding-standard\u002Ferrata-for-sei-cert-c-coding-standard-2016-edition","4.sei-cert-c-coding-standard\u002F06.errata-for-sei-cert-c-coding-standard-2016-edition",{"title":4488,"path":4489,"stem":4490},"Wiki Contents","\u002Fsei-cert-c-coding-standard\u002Fwiki-contents","4.sei-cert-c-coding-standard\u002F06.wiki-contents",{"title":4492,"path":4493,"stem":4494,"children":4495},"Recommendations","\u002Fsei-cert-c-coding-standard\u002Frecommendations","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F01.index",[4496,4497,4538,4555,4600,4635,4730,4747,4780,4849,4886,4971,5036,5085,5110,5203,5224,5281],{"title":4492,"path":4493,"stem":4494},{"title":3586,"path":4498,"stem":4499,"children":4500},"\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fapplication-programming-interfaces-api","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F02.application-programming-interfaces-api\u002F01.index",[4501,4502,4506,4510,4514,4518,4522,4526,4530,4534],{"title":3586,"path":4498,"stem":4499},{"title":4503,"path":4504,"stem":4505},"API00-C. Functions should validate their parameters","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fapplication-programming-interfaces-api\u002Fapi00-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F02.application-programming-interfaces-api\u002F02.api00-c",{"title":4507,"path":4508,"stem":4509},"API01-C. Avoid laying out strings in memory directly before sensitive data","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fapplication-programming-interfaces-api\u002Fapi01-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F02.application-programming-interfaces-api\u002F03.api01-c",{"title":4511,"path":4512,"stem":4513},"API02-C. Functions that read or write to or from an array should take an argument to specify the source or target size","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fapplication-programming-interfaces-api\u002Fapi02-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F02.application-programming-interfaces-api\u002F04.api02-c",{"title":4515,"path":4516,"stem":4517},"API03-C. Create consistent interfaces and capabilities across related functions","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fapplication-programming-interfaces-api\u002Fapi03-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F02.application-programming-interfaces-api\u002F05.api03-c",{"title":4519,"path":4520,"stem":4521},"API04-C. Provide a consistent and usable error-checking mechanism","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fapplication-programming-interfaces-api\u002Fapi04-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F02.application-programming-interfaces-api\u002F06.api04-c",{"title":4523,"path":4524,"stem":4525},"API05-C. Use conformant array parameters","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fapplication-programming-interfaces-api\u002Fapi05-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F02.application-programming-interfaces-api\u002F07.api05-c",{"title":4527,"path":4528,"stem":4529},"API07-C. Enforce type safety","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fapplication-programming-interfaces-api\u002Fapi07-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F02.application-programming-interfaces-api\u002F08.api07-c",{"title":4531,"path":4532,"stem":4533},"API09-C. Compatible values should have the same type","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fapplication-programming-interfaces-api\u002Fapi09-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F02.application-programming-interfaces-api\u002F09.api09-c",{"title":4535,"path":4536,"stem":4537},"API10-C. APIs should have security options enabled by default","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fapplication-programming-interfaces-api\u002Fapi10-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F02.application-programming-interfaces-api\u002F10.api10-c",{"title":3590,"path":4539,"stem":4540,"children":4541},"\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Farrays-arr","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F03.arrays-arr\u002F1.index",[4542,4543,4547,4551],{"title":3590,"path":4539,"stem":4540},{"title":4544,"path":4545,"stem":4546},"ARR00-C. Understand how arrays work","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Farrays-arr\u002Farr00-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F03.arrays-arr\u002F2.arr00-c",{"title":4548,"path":4549,"stem":4550},"ARR01-C. Do not apply the sizeof operator to a pointer when taking the size of an array","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Farrays-arr\u002Farr01-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F03.arrays-arr\u002F3.arr01-c",{"title":4552,"path":4553,"stem":4554},"ARR02-C. Explicitly specify array bounds, even if implicitly defined by an initializer","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Farrays-arr\u002Farr02-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F03.arrays-arr\u002F4.arr02-c",{"title":3620,"path":4556,"stem":4557,"children":4558},"\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fcharacters-and-strings-str","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F04.characters-and-strings-str\u002F01.index",[4559,4560,4564,4568,4572,4576,4580,4584,4588,4592,4596],{"title":3620,"path":4556,"stem":4557},{"title":4561,"path":4562,"stem":4563},"STR00-C. Represent characters using an appropriate type","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fcharacters-and-strings-str\u002Fstr00-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F04.characters-and-strings-str\u002F02.str00-c",{"title":4565,"path":4566,"stem":4567},"STR01-C. Adopt and implement a consistent plan for managing strings","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fcharacters-and-strings-str\u002Fstr01-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F04.characters-and-strings-str\u002F03.str01-c",{"title":4569,"path":4570,"stem":4571},"STR02-C. Sanitize data passed to complex subsystems","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fcharacters-and-strings-str\u002Fstr02-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F04.characters-and-strings-str\u002F04.str02-c",{"title":4573,"path":4574,"stem":4575},"STR03-C. Do not inadvertently truncate a string","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fcharacters-and-strings-str\u002Fstr03-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F04.characters-and-strings-str\u002F05.str03-c",{"title":4577,"path":4578,"stem":4579},"STR04-C. Use plain char for characters in the basic character set","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fcharacters-and-strings-str\u002Fstr04-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F04.characters-and-strings-str\u002F06.str04-c",{"title":4581,"path":4582,"stem":4583},"STR05-C. Use pointers to const when referring to string literals","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fcharacters-and-strings-str\u002Fstr05-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F04.characters-and-strings-str\u002F07.str05-c",{"title":4585,"path":4586,"stem":4587},"STR06-C. Do not assume that strtok() leaves the parse string unchanged","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fcharacters-and-strings-str\u002Fstr06-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F04.characters-and-strings-str\u002F08.str06-c",{"title":4589,"path":4590,"stem":4591},"STR09-C. Don't assume numeric values for expressions with type plain character","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fcharacters-and-strings-str\u002Fstr09-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F04.characters-and-strings-str\u002F09.str09-c",{"title":4593,"path":4594,"stem":4595},"STR10-C. Do not concatenate different type of string literals","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fcharacters-and-strings-str\u002Fstr10-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F04.characters-and-strings-str\u002F10.str10-c",{"title":4597,"path":4598,"stem":4599},"STR11-C. Do not specify the bound of a character array initialized with a string literal","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fcharacters-and-strings-str\u002Fstr11-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F04.characters-and-strings-str\u002F11.str11-c",{"title":3650,"path":4601,"stem":4602,"children":4603},"\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fconcurrency-con","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F05.concurrency-con\u002F01.index",[4604,4605,4609,4613,4617,4621,4625,4629,4633,4634],{"title":3650,"path":4601,"stem":4602},{"title":4606,"path":4607,"stem":4608},"CON01-C. Acquire and release synchronization primitives in the same module, at the same level of abstraction","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fconcurrency-con\u002Fcon01-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F05.concurrency-con\u002F02.con01-c",{"title":4610,"path":4611,"stem":4612},"CON02-C. Do not use volatile as a synchronization primitive","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fconcurrency-con\u002Fcon02-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F05.concurrency-con\u002F03.con02-c",{"title":4614,"path":4615,"stem":4616},"CON03-C. Ensure visibility when accessing shared variables","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fconcurrency-con\u002Fcon03-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F05.concurrency-con\u002F04.con03-c",{"title":4618,"path":4619,"stem":4620},"CON04-C. Join or detach threads even if their exit status is unimportant","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fconcurrency-con\u002Fcon04-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F05.concurrency-con\u002F05.con04-c",{"title":4622,"path":4623,"stem":4624},"CON05-C. Do not perform operations that can block while holding a lock","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fconcurrency-con\u002Fcon05-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F05.concurrency-con\u002F06.con05-c",{"title":4626,"path":4627,"stem":4628},"CON06-C. Ensure that every mutex outlives the data it protects","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fconcurrency-con\u002Fcon06-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F05.concurrency-con\u002F07.con06-c",{"title":4630,"path":4631,"stem":4632},"CON07-C. Ensure that compound operations on shared variables are atomic","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fconcurrency-con\u002Fcon07-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F05.concurrency-con\u002F08.con07-c",{"title":3494,"path":3447,"stem":3495},{"title":30,"path":3488,"stem":3490},{"title":3497,"path":3498,"stem":3499,"children":4636},[4637,4638,4642,4646,4650,4654,4658,4662,4666,4670,4674,4678,4682,4686,4690,4694,4698,4702,4706,4710,4714,4718,4722,4726],{"title":3497,"path":3498,"stem":3499},{"title":4639,"path":4640,"stem":4641},"DCL00-C. Const-qualify immutable objects","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fdeclarations-and-initialization-dcl\u002Fdcl00-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F06.declarations-and-initialization-dcl\u002F02.dcl00-c",{"title":4643,"path":4644,"stem":4645},"DCL01-C. Do not reuse variable names in subscopes","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fdeclarations-and-initialization-dcl\u002Fdcl01-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F06.declarations-and-initialization-dcl\u002F03.dcl01-c",{"title":4647,"path":4648,"stem":4649},"DCL02-C. Use visually distinct identifiers","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fdeclarations-and-initialization-dcl\u002Fdcl02-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F06.declarations-and-initialization-dcl\u002F04.dcl02-c",{"title":4651,"path":4652,"stem":4653},"DCL03-C. Use a static assertion to test the value of a constant expression","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fdeclarations-and-initialization-dcl\u002Fdcl03-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F06.declarations-and-initialization-dcl\u002F05.dcl03-c",{"title":4655,"path":4656,"stem":4657},"DCL04-C. Do not declare more than one variable per declaration","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fdeclarations-and-initialization-dcl\u002Fdcl04-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F06.declarations-and-initialization-dcl\u002F06.dcl04-c",{"title":4659,"path":4660,"stem":4661},"DCL05-C. Use typedefs of non-pointer types only","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fdeclarations-and-initialization-dcl\u002Fdcl05-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F06.declarations-and-initialization-dcl\u002F07.dcl05-c",{"title":4663,"path":4664,"stem":4665},"DCL06-C. Use meaningful symbolic constants to represent literal values","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fdeclarations-and-initialization-dcl\u002Fdcl06-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F06.declarations-and-initialization-dcl\u002F08.dcl06-c",{"title":4667,"path":4668,"stem":4669},"DCL07-C. Include the appropriate type information in function declarators","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fdeclarations-and-initialization-dcl\u002Fdcl07-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F06.declarations-and-initialization-dcl\u002F09.dcl07-c",{"title":4671,"path":4672,"stem":4673},"DCL08-C. Properly encode relationships in constant definitions","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fdeclarations-and-initialization-dcl\u002Fdcl08-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F06.declarations-and-initialization-dcl\u002F10.dcl08-c",{"title":4675,"path":4676,"stem":4677},"DCL09-C. Declare functions that return errno with a return type of errno_t","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fdeclarations-and-initialization-dcl\u002Fdcl09-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F06.declarations-and-initialization-dcl\u002F11.dcl09-c",{"title":4679,"path":4680,"stem":4681},"DCL10-C. Maintain the contract between the writer and caller of variadic functions","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fdeclarations-and-initialization-dcl\u002Fdcl10-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F06.declarations-and-initialization-dcl\u002F12.dcl10-c",{"title":4683,"path":4684,"stem":4685},"DCL11-C. Understand the type issues associated with variadic functions","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fdeclarations-and-initialization-dcl\u002Fdcl11-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F06.declarations-and-initialization-dcl\u002F13.dcl11-c",{"title":4687,"path":4688,"stem":4689},"DCL12-C. Implement abstract data types using opaque types","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fdeclarations-and-initialization-dcl\u002Fdcl12-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F06.declarations-and-initialization-dcl\u002F14.dcl12-c",{"title":4691,"path":4692,"stem":4693},"DCL13-C. Declare function parameters that are pointers to values not changed by the function as const","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fdeclarations-and-initialization-dcl\u002Fdcl13-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F06.declarations-and-initialization-dcl\u002F15.dcl13-c",{"title":4695,"path":4696,"stem":4697},"DCL15-C. Declare file-scope objects or functions that do not need external linkage as static","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fdeclarations-and-initialization-dcl\u002Fdcl15-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F06.declarations-and-initialization-dcl\u002F16.dcl15-c",{"title":4699,"path":4700,"stem":4701},"DCL16-C. Use \"L,\" not \"l,\" to indicate a long value","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fdeclarations-and-initialization-dcl\u002Fdcl16-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F06.declarations-and-initialization-dcl\u002F17.dcl16-c",{"title":4703,"path":4704,"stem":4705},"DCL17-C. Beware of miscompiled volatile-qualified variables","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fdeclarations-and-initialization-dcl\u002Fdcl17-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F06.declarations-and-initialization-dcl\u002F18.dcl17-c",{"title":4707,"path":4708,"stem":4709},"DCL18-C. Do not begin integer constants with 0 when specifying a decimal value","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fdeclarations-and-initialization-dcl\u002Fdcl18-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F06.declarations-and-initialization-dcl\u002F19.dcl18-c",{"title":4711,"path":4712,"stem":4713},"DCL19-C. Minimize the scope of variables and functions","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fdeclarations-and-initialization-dcl\u002Fdcl19-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F06.declarations-and-initialization-dcl\u002F20.dcl19-c",{"title":4715,"path":4716,"stem":4717},"DCL20-C. Explicitly specify void when a function accepts no arguments","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fdeclarations-and-initialization-dcl\u002Fdcl20-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F06.declarations-and-initialization-dcl\u002F21.dcl20-c",{"title":4719,"path":4720,"stem":4721},"DCL21-C. Understand the storage of compound literals","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fdeclarations-and-initialization-dcl\u002Fdcl21-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F06.declarations-and-initialization-dcl\u002F22.dcl21-c",{"title":4723,"path":4724,"stem":4725},"DCL22-C. Use volatile for data that cannot be cached","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fdeclarations-and-initialization-dcl\u002Fdcl22-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F06.declarations-and-initialization-dcl\u002F23.dcl22-c",{"title":4727,"path":4728,"stem":4729},"DCL23-C. Guarantee that mutually visible identifiers are unique","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fdeclarations-and-initialization-dcl\u002Fdcl23-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F06.declarations-and-initialization-dcl\u002F24.dcl23-c",{"title":3749,"path":4731,"stem":4732,"children":4733},"\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fenvironment-env","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F07.environment-env\u002F1.index",[4734,4735,4739,4743],{"title":3749,"path":4731,"stem":4732},{"title":4736,"path":4737,"stem":4738},"ENV01-C. Do not make assumptions about the size of an environment variable","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fenvironment-env\u002Fenv01-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F07.environment-env\u002F2.env01-c",{"title":4740,"path":4741,"stem":4742},"ENV02-C. Beware of multiple environment variables with the same effective name","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fenvironment-env\u002Fenv02-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F07.environment-env\u002F3.env02-c",{"title":4744,"path":4745,"stem":4746},"ENV03-C. Sanitize the environment when invoking external programs","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fenvironment-env\u002Fenv03-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F07.environment-env\u002F4.env03-c",{"title":3775,"path":4748,"stem":4749,"children":4750},"\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Ferror-handling-err","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F08.error-handling-err\u002F1.index",[4751,4752,4756,4760,4764,4768,4772,4776],{"title":3775,"path":4748,"stem":4749},{"title":4753,"path":4754,"stem":4755},"ERR00-C. Adopt and implement a consistent and comprehensive error-handling policy","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Ferror-handling-err\u002Ferr00-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F08.error-handling-err\u002F2.err00-c",{"title":4757,"path":4758,"stem":4759},"ERR01-C. Use ferror() rather than errno to check for FILE stream errors","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Ferror-handling-err\u002Ferr01-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F08.error-handling-err\u002F3.err01-c",{"title":4761,"path":4762,"stem":4763},"ERR02-C. Avoid in-band error indicators","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Ferror-handling-err\u002Ferr02-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F08.error-handling-err\u002F4.err02-c",{"title":4765,"path":4766,"stem":4767},"ERR04-C. Choose an appropriate termination strategy","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Ferror-handling-err\u002Ferr04-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F08.error-handling-err\u002F5.err04-c",{"title":4769,"path":4770,"stem":4771},"ERR05-C. Application-independent code should provide error detection without dictating error handling","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Ferror-handling-err\u002Ferr05-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F08.error-handling-err\u002F6.err05-c",{"title":4773,"path":4774,"stem":4775},"ERR06-C. Understand the termination behavior of assert() and abort()","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Ferror-handling-err\u002Ferr06-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F08.error-handling-err\u002F7.err06-c",{"title":4777,"path":4778,"stem":4779},"ERR07-C. Prefer functions that support error checking over equivalent functions that don't","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Ferror-handling-err\u002Ferr07-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F08.error-handling-err\u002F8.err07-c",{"title":3797,"path":4781,"stem":4782,"children":4783},"\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fexpressions-exp","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F09.expressions-exp\u002F01.index",[4784,4785,4789,4793,4797,4801,4805,4809,4813,4817,4821,4825,4829,4833,4837,4841,4845],{"title":3797,"path":4781,"stem":4782},{"title":4786,"path":4787,"stem":4788},"EXP00-C. Use parentheses for precedence of operation","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fexpressions-exp\u002Fexp00-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F09.expressions-exp\u002F02.exp00-c",{"title":4790,"path":4791,"stem":4792},"EXP02-C. Be aware of the short-circuit behavior of the logical AND and OR operators","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fexpressions-exp\u002Fexp02-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F09.expressions-exp\u002F03.exp02-c",{"title":4794,"path":4795,"stem":4796},"EXP03-C. Do not assume the size of a structure is the sum of the sizes of its members","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fexpressions-exp\u002Fexp03-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F09.expressions-exp\u002F04.exp03-c",{"title":4798,"path":4799,"stem":4800},"EXP05-C. Do not cast away a const qualification","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fexpressions-exp\u002Fexp05-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F09.expressions-exp\u002F05.exp05-c",{"title":4802,"path":4803,"stem":4804},"EXP07-C. Do not diminish the benefits of constants by assuming their values in expressions","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fexpressions-exp\u002Fexp07-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F09.expressions-exp\u002F06.exp07-c",{"title":4806,"path":4807,"stem":4808},"EXP08-C. Ensure pointer arithmetic is used correctly","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fexpressions-exp\u002Fexp08-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F09.expressions-exp\u002F07.exp08-c",{"title":4810,"path":4811,"stem":4812},"EXP09-C. Use sizeof to determine the size of a type or variable","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fexpressions-exp\u002Fexp09-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F09.expressions-exp\u002F08.exp09-c",{"title":4814,"path":4815,"stem":4816},"EXP10-C. Do not depend on the order of evaluation of subexpressions or the order in which side effects take place","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fexpressions-exp\u002Fexp10-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F09.expressions-exp\u002F09.exp10-c",{"title":4818,"path":4819,"stem":4820},"EXP11-C. Do not make assumptions regarding the layout of structures with bit-fields","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fexpressions-exp\u002Fexp11-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F09.expressions-exp\u002F10.exp11-c",{"title":4822,"path":4823,"stem":4824},"EXP12-C. Do not ignore values returned by functions","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fexpressions-exp\u002Fexp12-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F09.expressions-exp\u002F11.exp12-c",{"title":4826,"path":4827,"stem":4828},"EXP13-C. Treat relational and equality operators as if they were nonassociative","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fexpressions-exp\u002Fexp13-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F09.expressions-exp\u002F12.exp13-c",{"title":4830,"path":4831,"stem":4832},"EXP14-C. Beware of integer promotion when performing bitwise operations on integer types smaller than int","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fexpressions-exp\u002Fexp14-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F09.expressions-exp\u002F13.exp14-c",{"title":4834,"path":4835,"stem":4836},"EXP15-C. Do not place a semicolon on the same line as an if, for, or while statement","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fexpressions-exp\u002Fexp15-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F09.expressions-exp\u002F14.exp15-c",{"title":4838,"path":4839,"stem":4840},"EXP16-C. Do not compare function pointers to constant values","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fexpressions-exp\u002Fexp16-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F09.expressions-exp\u002F15.exp16-c",{"title":4842,"path":4843,"stem":4844},"EXP19-C. Use braces for the body of an if, for, or while statement","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fexpressions-exp\u002Fexp19-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F09.expressions-exp\u002F16.exp19-c",{"title":4846,"path":4847,"stem":4848},"EXP20-C. Perform explicit tests to determine success, true and false, and equality","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fexpressions-exp\u002Fexp20-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F09.expressions-exp\u002F17.exp20-c",{"title":3863,"path":4850,"stem":4851,"children":4852},"\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Ffloating-point-flp","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F10.floating-point-flp\u002F1.index",[4853,4854,4858,4862,4866,4870,4874,4878,4882],{"title":3863,"path":4850,"stem":4851},{"title":4855,"path":4856,"stem":4857},"FLP00-C. Understand the limitations of floating-point numbers","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Ffloating-point-flp\u002Fflp00-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F10.floating-point-flp\u002F2.flp00-c",{"title":4859,"path":4860,"stem":4861},"FLP01-C. Take care in rearranging floating-point expressions","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Ffloating-point-flp\u002Fflp01-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F10.floating-point-flp\u002F3.flp01-c",{"title":4863,"path":4864,"stem":4865},"FLP02-C. Avoid using floating-point numbers when precise computation is needed","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Ffloating-point-flp\u002Fflp02-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F10.floating-point-flp\u002F4.flp02-c",{"title":4867,"path":4868,"stem":4869},"FLP03-C. Detect and handle floating-point errors","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Ffloating-point-flp\u002Fflp03-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F10.floating-point-flp\u002F5.flp03-c",{"title":4871,"path":4872,"stem":4873},"FLP04-C. Check floating-point inputs for exceptional values","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Ffloating-point-flp\u002Fflp04-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F10.floating-point-flp\u002F6.flp04-c",{"title":4875,"path":4876,"stem":4877},"FLP05-C. Do not use denormalized numbers","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Ffloating-point-flp\u002Fflp05-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F10.floating-point-flp\u002F7.flp05-c",{"title":4879,"path":4880,"stem":4881},"FLP06-C. Convert integers to floating point for floating-point operations","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Ffloating-point-flp\u002Fflp06-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F10.floating-point-flp\u002F8.flp06-c",{"title":4883,"path":4884,"stem":4885},"FLP07-C. Cast the return value of a function that returns a floating-point type","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Ffloating-point-flp\u002Fflp07-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F10.floating-point-flp\u002F9.flp07-c",{"title":3889,"path":4887,"stem":4888,"children":4889},"\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Finput-output-fio","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F11.input-output-fio\u002F01.index",[4890,4891,4895,4899,4903,4907,4911,4915,4919,4923,4927,4931,4935,4939,4943,4947,4951,4955,4959,4963,4967],{"title":3889,"path":4887,"stem":4888},{"title":4892,"path":4893,"stem":4894},"FIO01-C. Be careful using functions that use file names for identification","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Finput-output-fio\u002Ffio01-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F11.input-output-fio\u002F02.fio01-c",{"title":4896,"path":4897,"stem":4898},"FIO02-C. Canonicalize path names originating from tainted sources","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Finput-output-fio\u002Ffio02-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F11.input-output-fio\u002F03.fio02-c",{"title":4900,"path":4901,"stem":4902},"FIO03-C. Do not make assumptions about fopen() and file creation","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Finput-output-fio\u002Ffio03-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F11.input-output-fio\u002F04.fio03-c",{"title":4904,"path":4905,"stem":4906},"FIO05-C. Identify files using multiple file attributes","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Finput-output-fio\u002Ffio05-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F11.input-output-fio\u002F05.fio05-c",{"title":4908,"path":4909,"stem":4910},"FIO06-C. Create files with appropriate access permissions","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Finput-output-fio\u002Ffio06-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F11.input-output-fio\u002F06.fio06-c",{"title":4912,"path":4913,"stem":4914},"FIO08-C. Take care when calling remove() on an open file","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Finput-output-fio\u002Ffio08-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F11.input-output-fio\u002F07.fio08-c",{"title":4916,"path":4917,"stem":4918},"FIO09-C. Be careful with binary data when transferring data across systems","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Finput-output-fio\u002Ffio09-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F11.input-output-fio\u002F08.fio09-c",{"title":4920,"path":4921,"stem":4922},"FIO10-C. Take care when using the rename() function","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Finput-output-fio\u002Ffio10-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F11.input-output-fio\u002F09.fio10-c",{"title":4924,"path":4925,"stem":4926},"FIO11-C. Take care when specifying the mode parameter of fopen()","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Finput-output-fio\u002Ffio11-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F11.input-output-fio\u002F10.fio11-c",{"title":4928,"path":4929,"stem":4930},"FIO13-C. Never push back anything other than one read character","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Finput-output-fio\u002Ffio13-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F11.input-output-fio\u002F11.fio13-c",{"title":4932,"path":4933,"stem":4934},"FIO14-C. Understand the difference between text mode and binary mode with file streams","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Finput-output-fio\u002Ffio14-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F11.input-output-fio\u002F12.fio14-c",{"title":4936,"path":4937,"stem":4938},"FIO15-C. Ensure that file operations are performed in a secure directory","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Finput-output-fio\u002Ffio15-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F11.input-output-fio\u002F13.fio15-c",{"title":4940,"path":4941,"stem":4942},"FIO17-C. Do not rely on an ending null character when using fread()","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Finput-output-fio\u002Ffio17-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F11.input-output-fio\u002F14.fio17-c",{"title":4944,"path":4945,"stem":4946},"FIO18-C. Never expect fwrite() to terminate the writing process at a null character","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Finput-output-fio\u002Ffio18-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F11.input-output-fio\u002F15.fio18-c",{"title":4948,"path":4949,"stem":4950},"FIO19-C. Do not use fseek() and ftell() to compute the size of a regular file","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Finput-output-fio\u002Ffio19-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F11.input-output-fio\u002F16.fio19-c",{"title":4952,"path":4953,"stem":4954},"FIO20-C. Avoid unintentional truncation when using fgets() or fgetws()","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Finput-output-fio\u002Ffio20-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F11.input-output-fio\u002F17.fio20-c",{"title":4956,"path":4957,"stem":4958},"FIO21-C. Do not create temporary files in shared directories","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Finput-output-fio\u002Ffio21-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F11.input-output-fio\u002F18.fio21-c",{"title":4960,"path":4961,"stem":4962},"FIO22-C. Close files before spawning processes","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Finput-output-fio\u002Ffio22-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F11.input-output-fio\u002F19.fio22-c",{"title":4964,"path":4965,"stem":4966},"FIO23-C. Do not exit with unflushed data in stdout or stderr","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Finput-output-fio\u002Ffio23-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F11.input-output-fio\u002F20.fio23-c",{"title":4968,"path":4969,"stem":4970},"FIO24-C. Do not open a file that is already open","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Finput-output-fio\u002Ffio24-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F11.input-output-fio\u002F21.fio24-c",{"title":3947,"path":4972,"stem":4973,"children":4974},"\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fintegers-int","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F12.integers-int\u002F01.index",[4975,4976,4980,4984,4988,4992,4996,5000,5004,5008,5012,5016,5020,5024,5028,5032],{"title":3947,"path":4972,"stem":4973},{"title":4977,"path":4978,"stem":4979},"INT00-C. Understand the data model used by your implementation(s)","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fintegers-int\u002Fint00-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F12.integers-int\u002F02.int00-c",{"title":4981,"path":4982,"stem":4983},"INT01-C. Use size_t or rsize_t for all integer values representing the size of an object","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fintegers-int\u002Fint01-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F12.integers-int\u002F03.int01-c",{"title":4985,"path":4986,"stem":4987},"INT04-C. Enforce limits on integer values originating from tainted sources","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fintegers-int\u002Fint04-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F12.integers-int\u002F05.int04-c",{"title":4989,"path":4990,"stem":4991},"INT05-C. Do not use input functions to convert character data if they cannot handle all possible inputs","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fintegers-int\u002Fint05-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F12.integers-int\u002F06.int05-c",{"title":4993,"path":4994,"stem":4995},"INT07-C. Use only explicitly signed or unsigned char type for numeric values","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fintegers-int\u002Fint07-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F12.integers-int\u002F07.int07-c",{"title":4997,"path":4998,"stem":4999},"INT08-C. Verify that all integer values are in range","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fintegers-int\u002Fint08-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F12.integers-int\u002F08.int08-c",{"title":5001,"path":5002,"stem":5003},"INT09-C. Ensure enumeration constants map to unique values","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fintegers-int\u002Fint09-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F12.integers-int\u002F09.int09-c",{"title":5005,"path":5006,"stem":5007},"INT10-C. Do not assume a positive remainder when using the % operator","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fintegers-int\u002Fint10-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F12.integers-int\u002F10.int10-c",{"title":5009,"path":5010,"stem":5011},"INT12-C. Do not make assumptions about the type of a plain int bit-field when used in an expression","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fintegers-int\u002Fint12-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F12.integers-int\u002F11.int12-c",{"title":5013,"path":5014,"stem":5015},"INT13-C. Use bitwise operators only on unsigned operands","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fintegers-int\u002Fint13-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F12.integers-int\u002F12.int13-c",{"title":5017,"path":5018,"stem":5019},"INT14-C. Avoid performing bitwise and arithmetic operations on the same data","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fintegers-int\u002Fint14-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F12.integers-int\u002F13.int14-c",{"title":5021,"path":5022,"stem":5023},"INT15-C. Use intmax_t or uintmax_t for formatted IO on programmer-defined integer types","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fintegers-int\u002Fint15-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F12.integers-int\u002F14.int15-c",{"title":5025,"path":5026,"stem":5027},"INT16-C. Do not make assumptions about representation of signed integers","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fintegers-int\u002Fint16-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F12.integers-int\u002F15.int16-c",{"title":5029,"path":5030,"stem":5031},"INT17-C. Define integer constants in an implementation-independent manner","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fintegers-int\u002Fint17-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F12.integers-int\u002F16.int17-c",{"title":5033,"path":5034,"stem":5035},"INT18-C. Evaluate integer expressions in a larger size before comparing or assigning to that size","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fintegers-int\u002Fint18-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F12.integers-int\u002F17.int18-c",{"title":3981,"path":5037,"stem":5038,"children":5039},"\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fmemory-management-mem","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F13.memory-management-mem\u002F01.index",[5040,5041,5045,5049,5053,5057,5061,5065,5069,5073,5077,5081],{"title":3981,"path":5037,"stem":5038},{"title":5042,"path":5043,"stem":5044},"MEM00-C. Allocate and free memory in the same module, at the same level of abstraction","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fmemory-management-mem\u002Fmem00-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F13.memory-management-mem\u002F02.mem00-c",{"title":5046,"path":5047,"stem":5048},"MEM01-C. Store a new value in pointers immediately after free()","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fmemory-management-mem\u002Fmem01-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F13.memory-management-mem\u002F03.mem01-c",{"title":5050,"path":5051,"stem":5052},"MEM02-C. Immediately cast the result of a memory allocation function call into a pointer to the allocated type","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fmemory-management-mem\u002Fmem02-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F13.memory-management-mem\u002F04.mem02-c",{"title":5054,"path":5055,"stem":5056},"MEM03-C. Clear sensitive information stored in reusable resources","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fmemory-management-mem\u002Fmem03-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F13.memory-management-mem\u002F05.mem03-c",{"title":5058,"path":5059,"stem":5060},"MEM04-C. Beware of zero-length allocations","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fmemory-management-mem\u002Fmem04-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F13.memory-management-mem\u002F06.mem04-c",{"title":5062,"path":5063,"stem":5064},"MEM05-C. Avoid large stack allocations","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fmemory-management-mem\u002Fmem05-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F13.memory-management-mem\u002F07.mem05-c",{"title":5066,"path":5067,"stem":5068},"MEM06-C. Ensure that sensitive data is not written out to disk","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fmemory-management-mem\u002Fmem06-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F13.memory-management-mem\u002F08.mem06-c",{"title":5070,"path":5071,"stem":5072},"MEM07-C. Ensure that the arguments to calloc(), when multiplied, do not wrap","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fmemory-management-mem\u002Fmem07-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F13.memory-management-mem\u002F09.mem07-c",{"title":5074,"path":5075,"stem":5076},"MEM10-C. Define and use a pointer validation function","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fmemory-management-mem\u002Fmem10-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F13.memory-management-mem\u002F10.mem10-c",{"title":5078,"path":5079,"stem":5080},"MEM11-C. Do not assume infinite heap space","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fmemory-management-mem\u002Fmem11-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F13.memory-management-mem\u002F11.mem11-c",{"title":5082,"path":5083,"stem":5084},"MEM12-C. Consider using a goto chain when leaving a function on error when using and releasing resources","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fmemory-management-mem\u002Fmem12-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F13.memory-management-mem\u002F12.mem12-c",{"title":4011,"path":5086,"stem":5087,"children":5088},"\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fmicrosoft-windows-win","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F14.microsoft-windows-win\u002F1.index",[5089,5090,5094,5098,5102,5106],{"title":4011,"path":5086,"stem":5087},{"title":5091,"path":5092,"stem":5093},"WIN00-C. Be specific when dynamically loading libraries","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fmicrosoft-windows-win\u002Fwin00-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F14.microsoft-windows-win\u002F2.win00-c",{"title":5095,"path":5096,"stem":5097},"WIN01-C. Do not forcibly terminate execution","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fmicrosoft-windows-win\u002Fwin01-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F14.microsoft-windows-win\u002F3.win01-c",{"title":5099,"path":5100,"stem":5101},"WIN02-C. Restrict privileges when spawning child processes","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fmicrosoft-windows-win\u002Fwin02-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F14.microsoft-windows-win\u002F4.win02-c",{"title":5103,"path":5104,"stem":5105},"WIN03-C. Understand HANDLE inheritance","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fmicrosoft-windows-win\u002Fwin03-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F14.microsoft-windows-win\u002F5.win03-c",{"title":5107,"path":5108,"stem":5109},"WIN04-C. Consider encrypting function pointers","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fmicrosoft-windows-win\u002Fwin04-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F14.microsoft-windows-win\u002F6.win04-c",{"title":4021,"path":5111,"stem":5112,"children":5113},"\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fmiscellaneous-msc","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F15.miscellaneous-msc\u002F01.index",[5114,5115,5119,5123,5127,5131,5135,5139,5143,5147,5151,5155,5159,5163,5167,5171,5175,5179,5183,5187,5191,5195,5199],{"title":4021,"path":5111,"stem":5112},{"title":5116,"path":5117,"stem":5118},"MSC00-C. Compile cleanly at high warning levels","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fmiscellaneous-msc\u002Fmsc00-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F15.miscellaneous-msc\u002F02.msc00-c",{"title":5120,"path":5121,"stem":5122},"MSC01-C. Strive for logical completeness","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fmiscellaneous-msc\u002Fmsc01-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F15.miscellaneous-msc\u002F03.msc01-c",{"title":5124,"path":5125,"stem":5126},"MSC04-C. Use comments consistently and in a readable fashion","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fmiscellaneous-msc\u002Fmsc04-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F15.miscellaneous-msc\u002F04.msc04-c",{"title":5128,"path":5129,"stem":5130},"MSC05-C. Do not manipulate time_t typed values directly","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fmiscellaneous-msc\u002Fmsc05-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F15.miscellaneous-msc\u002F05.msc05-c",{"title":5132,"path":5133,"stem":5134},"MSC06-C. Beware of compiler optimizations","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fmiscellaneous-msc\u002Fmsc06-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F15.miscellaneous-msc\u002F06.msc06-c",{"title":5136,"path":5137,"stem":5138},"MSC07-C. Detect and remove dead code","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fmiscellaneous-msc\u002Fmsc07-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F15.miscellaneous-msc\u002F07.msc07-c",{"title":5140,"path":5141,"stem":5142},"UTF8-related issues","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fmiscellaneous-msc\u002Futf8-related-issues","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F15.miscellaneous-msc\u002F08.utf8-related-issues",{"title":5144,"path":5145,"stem":5146},"MSC11-C. Incorporate diagnostic tests using assertions","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fmiscellaneous-msc\u002Fmsc11-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F15.miscellaneous-msc\u002F09.msc11-c",{"title":5148,"path":5149,"stem":5150},"MSC12-C. Detect and remove code that has no effect or is never executed","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fmiscellaneous-msc\u002Fmsc12-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F15.miscellaneous-msc\u002F10.msc12-c",{"title":5152,"path":5153,"stem":5154},"MSC13-C. Detect and remove unused values","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fmiscellaneous-msc\u002Fmsc13-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F15.miscellaneous-msc\u002F11.msc13-c",{"title":5156,"path":5157,"stem":5158},"MSC14-C. Do not introduce unnecessary platform dependencies","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fmiscellaneous-msc\u002Fmsc14-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F15.miscellaneous-msc\u002F12.msc14-c",{"title":5160,"path":5161,"stem":5162},"MSC15-C. Do not depend on undefined behavior","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fmiscellaneous-msc\u002Fmsc15-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F15.miscellaneous-msc\u002F13.msc15-c",{"title":5164,"path":5165,"stem":5166},"MSC17-C. Finish every set of statements associated with a case label with a break statement","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fmiscellaneous-msc\u002Fmsc17-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F15.miscellaneous-msc\u002F14.msc17-c",{"title":5168,"path":5169,"stem":5170},"MSC18-C. Be careful while handling sensitive data, such as passwords, in program code","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fmiscellaneous-msc\u002Fmsc18-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F15.miscellaneous-msc\u002F15.msc18-c",{"title":5172,"path":5173,"stem":5174},"MSC19-C. For functions that return an array, prefer returning an empty array over a null value","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fmiscellaneous-msc\u002Fmsc19-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F15.miscellaneous-msc\u002F16.msc19-c",{"title":5176,"path":5177,"stem":5178},"MSC20-C. Do not use a switch statement to transfer control into a complex block","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fmiscellaneous-msc\u002Fmsc20-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F15.miscellaneous-msc\u002F17.msc20-c",{"title":5180,"path":5181,"stem":5182},"MSC21-C. Use robust loop termination conditions","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fmiscellaneous-msc\u002Fmsc21-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F15.miscellaneous-msc\u002F18.msc21-c",{"title":5184,"path":5185,"stem":5186},"MSC22-C. Use the setjmp(), longjmp() facility securely","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fmiscellaneous-msc\u002Fmsc22-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F15.miscellaneous-msc\u002F19.msc22-c",{"title":5188,"path":5189,"stem":5190},"MSC23-C. Beware of vendor-specific library and language differences","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fmiscellaneous-msc\u002Fmsc23-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F15.miscellaneous-msc\u002F20.msc23-c",{"title":5192,"path":5193,"stem":5194},"MSC24-C. Do not use deprecated or obsolescent functions","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fmiscellaneous-msc\u002Fmsc24-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F15.miscellaneous-msc\u002F21.msc24-c",{"title":5196,"path":5197,"stem":5198},"MSC25-C. Do not use insecure or weak cryptographic algorithms","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fmiscellaneous-msc\u002Fmsc25-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F15.miscellaneous-msc\u002F22.msc25-c",{"title":5200,"path":5201,"stem":5202},"Use subset of ASCII for safety","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fmiscellaneous-msc\u002Fuse-subset-of-ascii-for-safety","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F15.miscellaneous-msc\u002F23.use-subset-of-ascii-for-safety",{"title":4059,"path":5204,"stem":5205,"children":5206},"\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fposix-pos","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F16.posix-pos\u002F1.index",[5207,5208,5212,5216,5220],{"title":4059,"path":5204,"stem":5205},{"title":5209,"path":5210,"stem":5211},"POS01-C. Check for the existence of links when dealing with files","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fposix-pos\u002Fpos01-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F16.posix-pos\u002F2.pos01-c",{"title":5213,"path":5214,"stem":5215},"POS02-C. Follow the principle of least privilege","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fposix-pos\u002Fpos02-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F16.posix-pos\u002F3.pos02-c",{"title":5217,"path":5218,"stem":5219},"POS04-C. Avoid using PTHREAD_MUTEX_NORMAL type mutex locks","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fposix-pos\u002Fpos04-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F16.posix-pos\u002F4.pos04-c",{"title":5221,"path":5222,"stem":5223},"POS05-C. Limit access to files by creating a jail","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fposix-pos\u002Fpos05-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F16.posix-pos\u002F5.pos05-c",{"title":4129,"path":5225,"stem":5226,"children":5227},"\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fpreprocessor-pre","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F17.preprocessor-pre\u002F01.index",[5228,5229,5233,5237,5241,5245,5249,5253,5257,5261,5265,5269,5273,5277],{"title":4129,"path":5225,"stem":5226},{"title":5230,"path":5231,"stem":5232},"PRE00-C. Prefer inline or static functions to function-like macros","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fpreprocessor-pre\u002Fpre00-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F17.preprocessor-pre\u002F02.pre00-c",{"title":5234,"path":5235,"stem":5236},"PRE01-C. Use parentheses within macros around parameter names","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fpreprocessor-pre\u002Fpre01-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F17.preprocessor-pre\u002F03.pre01-c",{"title":5238,"path":5239,"stem":5240},"PRE02-C. Macro replacement lists should be parenthesized","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fpreprocessor-pre\u002Fpre02-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F17.preprocessor-pre\u002F04.pre02-c",{"title":5242,"path":5243,"stem":5244},"PRE04-C. Do not reuse a standard header file name","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fpreprocessor-pre\u002Fpre04-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F17.preprocessor-pre\u002F05.pre04-c",{"title":5246,"path":5247,"stem":5248},"PRE05-C. Understand macro replacement when concatenating tokens or performing stringification","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fpreprocessor-pre\u002Fpre05-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F17.preprocessor-pre\u002F06.pre05-c",{"title":5250,"path":5251,"stem":5252},"PRE06-C. Enclose header files in an include guard","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fpreprocessor-pre\u002Fpre06-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F17.preprocessor-pre\u002F07.pre06-c",{"title":5254,"path":5255,"stem":5256},"PRE07-C. Avoid using repeated question marks","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fpreprocessor-pre\u002Fpre07-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F17.preprocessor-pre\u002F08.pre07-c",{"title":5258,"path":5259,"stem":5260},"PRE08-C. Guarantee that header file names are unique","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fpreprocessor-pre\u002Fpre08-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F17.preprocessor-pre\u002F09.pre08-c",{"title":5262,"path":5263,"stem":5264},"PRE09-C. Do not replace secure functions with deprecated or obsolescent functions","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fpreprocessor-pre\u002Fpre09-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F17.preprocessor-pre\u002F10.pre09-c",{"title":5266,"path":5267,"stem":5268},"PRE10-C. Wrap multistatement macros in a do-while loop","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fpreprocessor-pre\u002Fpre10-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F17.preprocessor-pre\u002F11.pre10-c",{"title":5270,"path":5271,"stem":5272},"PRE11-C. Do not conclude macro definitions with a semicolon","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fpreprocessor-pre\u002Fpre11-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F17.preprocessor-pre\u002F12.pre11-c",{"title":5274,"path":5275,"stem":5276},"PRE12-C. Do not define unsafe macros","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fpreprocessor-pre\u002Fpre12-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F17.preprocessor-pre\u002F13.pre12-c",{"title":5278,"path":5279,"stem":5280},"PRE13-C. Use the Standard predefined macros to test for versions and features.","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fpreprocessor-pre\u002Fpre13-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F17.preprocessor-pre\u002F14.pre13-c",{"title":4147,"path":5282,"stem":5283,"children":5284},"\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fsignals-sig","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F18.signals-sig\u002F1.index",[5285,5286,5290,5294],{"title":4147,"path":5282,"stem":5283},{"title":5287,"path":5288,"stem":5289},"SIG00-C. Mask signals handled by noninterruptible signal handlers","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fsignals-sig\u002Fsig00-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F18.signals-sig\u002F2.sig00-c",{"title":5291,"path":5292,"stem":5293},"SIG01-C. Understand implementation-specific details regarding signal handler persistence","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fsignals-sig\u002Fsig01-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F18.signals-sig\u002F3.sig01-c",{"title":5295,"path":5296,"stem":5297},"SIG02-C. Avoid using signals to implement normal functionality","\u002Fsei-cert-c-coding-standard\u002Frecommendations\u002Fsignals-sig\u002Fsig02-c","4.sei-cert-c-coding-standard\u002F08.recommendations\u002F18.signals-sig\u002F4.sig02-c",{"title":5299,"path":5300,"stem":5301},"CERT manifest files","\u002Fsei-cert-c-coding-standard\u002Fcert-manifest-files","4.sei-cert-c-coding-standard\u002F09.cert-manifest-files",1775657841356]