<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Mon, Jun 15, 2015 at 9:31 AM, Daniel Berlin <span dir="ltr"><<a href="mailto:dberlin@dberlin.org" target="_blank">dberlin@dberlin.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div class=""><div class="h5">>> I tried to find some subset i felt was worthwhile and where it was<br>
>> okay, but gave up after a while.<br>
><br>
><br>
> I'm not quite sure which things you're referring to in that statement.<br>
> Would you mind clarifying?<br>
<br>
</div></div>You can try to ameliorate it by doing things like say "well, we<br>
believe code  patterns that look like this generate valid pointers,<br>
but patterns that look like this can be ignored".  It is very hard to<br>
find a set of patterns you allow that gives you anything meaningfully<br></blockquote><div><br></div><div>Interesting.  So do you know of a decent alternative?  Or do you think that may-point-to analysis in something as general as LLVM IR is basically a dead end?</div><div><br></div><div>Also, can you share a few examples of code constructs which produce pointers used in correct programs, but which are hard to recognize statically?  It's probably my inexperience talking, but the only examples I can think of involve interfacing with hardware.</div><div><br></div><div>I did look at the LLVM IR for calling a virtual function in C++, since you mentioned that as an example earlier.  From manual inspection, I thought I could spot the value flow of the virtual function pointer from where the function was defined, into the vtable constant for that class, and then into the class instance's vtable pointer.</div><div> <br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
As for your statement on authors putting a lot of thought into<br>
published algorithms - they do, but honestly, published algorithms<br>
should generally be treated like a starting point. They are often<br>
vastly simplified for publication, or otherwise in need of significant<br>
*engineering* work.<br>
</blockquote></div><br></div><div class="gmail_extra">Thanks for the warning.  Yes, I'm feeling that pain in spades :)</div></div>