<div dir="ltr"><div><div>Hi,<br><br></div>Never mind this e-mail, I realized that tracking this would involve inter-procedural analysis, which the Static Analyzer currently does not support.<br><br></div><div>Sorry for the spam!<br>
</div><div><br></div>Gabor<br></div><div class="gmail_extra"><br><br><div class="gmail_quote">2013/4/30 Gábor Kozár <span dir="ltr"><<a href="mailto:kozargabor@gmail.com" target="_blank">kozargabor@gmail.com</a>></span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><div><div>Hi,<br><br></div>I need to write a checker to make sure that the state of the transaction is checked after commit. This is working fine is basic cases, but it seems to fail when I introduce any level of indirection. For example, consider the following:<br>
<br>class TransactionPtr<br>{<br>public:<br> TransactionPtr(DummyTransaction& tr) : m_tr(tr) {}<br><br> DummyTransaction* getTransaction() { return &m_tr; }<br> <br>private:<br> DummyTransaction& m_tr;<br>
};<br><br>int main(int argc, char* argv[])<br>{<br> DummyTransaction tr;<br> TransactionPtr trp(tr);<br> <br> trp.getTransaction()->commit();<br> <br> if(tr.isSuccessful()) return 0;<br> else return 1;<br>
}<br><br></div>Running my checker on this reveals that the analyzer has no idea of the connection between trp.m_tr and tr, and so it fails to detect an issue with the above code.<br><br></div><div>I also tried checkBind(), but it is not called in relation to the TransactionPtr trp(tr); line.<br>
</div><div><br></div>Is this a known limitation, or am I missing something here? I also tried getBaseRegion(), getSuperRegion(), which didn't lead anywhere. getMemorySpace() on the other hand points to UnknownSpaceRegion.<br>
<br></div>Thanks!<br><br>Gabor<br></div>
</blockquote></div><br></div>