<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; color: rgb(0, 0, 0); font-size: 14px; font-family: Calibri, sans-serif;">
<div>Hello clang developers,</div>
<div><br>
</div>
<div>We recently found a memory leak at work we were not freeing allocated memory returned by the standard C string strdup() function. I ran the static analyzer against a version of the code with the defect and it didn't detect a memory leak. When I reduced
the code to a simpler test case the static analyzer correctly identified the leak. After a few iterations I found that the culprit was a varargs function where the variable that held a reference to the allocated memory was a parameter. With the call to the
varargs function commented out, the static analyzer identified the leak. With the call to the varargs function no warning was produced. </div>
<div><br>
</div>
<div>Is this a design decision or inherent limit in the static analyzer? Is this a known issue? I didn't see any bugs in the tracker. Should I file a bug?</div>
<div><br>
</div>
<div>Thanks,</div>
<div><br>
</div>
<div>Bob Kuo</div>
<div>
<div id="MAC_OUTLOOK_SIGNATURE"></div>
</div>
</body>
</html>